home *** CD-ROM | disk | FTP | other *** search
Wrap
<?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:import href="Strings.xsl"/> <xsl:output method="html" doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN" encoding="UTF-8" indent="yes"/> <!-- Indexing for cross referencing --> <xsl:key name="BaseTable-TableAliasIndex" match="RelationshipGraph/TableList/Table" use="@name"/> <xsl:key name="TableAlias-BaseTableIndex" match="RelationshipGraph/TableList/Table" use="@baseTable"/> <xsl:key name="Relationship-LeftTableAliasIndex" match="RelationshipGraph/RelationshipList/Relationship" use="LeftTable/@name"/> <xsl:key name="Relationship-RightTableAliasIndex" match="RelationshipGraph/RelationshipList/Relationship" use="RightTable/@name"/> <!-- Template for generating the main report. The main entry point for the transformation. --> <xsl:template name="MainReport" match="/"> <html> <head> <title> <xsl:value-of select="File/@name"/> </title> <link href="{$valReportCSS}" type="text/css" rel="stylesheet"/> </head> <body> <xsl:call-template name="Table-Overview"> <xsl:with-param name="inFile" select="FMPReport/File"/> </xsl:call-template> <!-- Construct the overview table --> <xsl:apply-templates/> </body> </html> </xsl:template> <xsl:template name="ReplaceString"> <xsl:param name="inputString"/> <xsl:param name="findString"/> <xsl:param name="replaceString"/> <xsl:choose> <xsl:when test="contains($inputString, $findString)"> <xsl:value-of select="concat(substring-before($inputString, $findString), $replaceString)"/> <xsl:call-template name="ReplaceString"> <xsl:with-param name="inputString" select="substring-after($inputString, $findString)"/> <xsl:with-param name="findString" select="$findString"/> <xsl:with-param name="replaceString" select="$replaceString"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select="$inputString"/> </xsl:otherwise> </xsl:choose> </xsl:template> <!-- Below are templates for generating different sections of the report --> <xsl:template name="Link-WithAnchor"> <xsl:param name="inAnchor"/> <xsl:param name="inDisplayText"/> <xsl:text disable-output-escaping="yes"> <a href=" </xsl:text> <xsl:value-of select="$inAnchor"/> <xsl:text disable-output-escaping="yes"> "> </xsl:text> <xsl:value-of select="$inDisplayText"/> <xsl:text disable-output-escaping="yes"> </a> </xsl:text> </xsl:template> <xsl:template name="AnchorPoint"> <xsl:param name="inAnchor"/> <xsl:param name="inDisplayText"/> <xsl:text disable-output-escaping="yes"><a name="</xsl:text><xsl:value-of select="$inAnchor"/><xsl:text disable-output-escaping="yes">"/></xsl:text><xsl:value-of select="$inDisplayText"/> </xsl:template> <xsl:template name="ItalicAnchorPoint"> <xsl:param name="inAnchor"/> <xsl:param name="inDisplayText"/> <xsl:text disable-output-escaping="yes"><a name="</xsl:text><xsl:value-of select="$inAnchor"/><xsl:text disable-output-escaping="yes">"/><em></xsl:text><xsl:value-of select="$inDisplayText"/><xsl:text disable-output-escaping="yes"></em></xsl:text> </xsl:template> <xsl:template name="TableAnchorPoint"> <xsl:param name="inAnchor"/> <xsl:param name="inDisplayText"/> <xsl:text disable-output-escaping="yes"><a name="</xsl:text><xsl:value-of select="$inAnchor"/><xsl:text disable-output-escaping="yes">"/></xsl:text><xsl:text disable-output-escaping="yes"><em></xsl:text><xsl:value-of select="$inDisplayText"/><xsl:text disable-output-escaping="yes"></em></xsl:text> </xsl:template> <xsl:template name="ItalicLink-WithAnchor"> <xsl:param name="inAnchor"/> <xsl:param name="inDisplayText"/> <xsl:text disable-output-escaping="yes"> <a href=" </xsl:text> <xsl:value-of select="$inAnchor"/> <xsl:text disable-output-escaping="yes"> "><em> </xsl:text> <xsl:value-of select="$inDisplayText"/> <xsl:text disable-output-escaping="yes"> </em></a> </xsl:text> </xsl:template> <xsl:template name="FullFieldLink-WithAnchor"> <xsl:param name="inAnchor"/> <xsl:param name="inTableName"/> <xsl:param name="inFieldName"/> <xsl:text disable-output-escaping="yes"> <a href=" </xsl:text> <xsl:value-of select="$inAnchor"/> <xsl:text disable-output-escaping="yes"> "><em> </xsl:text> <xsl:value-of select="$inTableName"/> <xsl:text disable-output-escaping="yes"> </em> </xsl:text><xsl:value-of select="concat('::',$inFieldName)"/> <xsl:text disable-output-escaping="yes"> </a> </xsl:text> </xsl:template> <!-- Section reference. --> <xsl:template name="SectionReference"> <xsl:param name="inSection"/> <xsl:param name="inCount"/> <xsl:choose> <xsl:when test="$inCount > 0"> <xsl:call-template name="Link-WithAnchor"> <xsl:with-param name="inAnchor" select="concat('#',$inSection, $kAnchorSection)"/> <xsl:with-param name="inDisplayText" select="$inCount"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select="$inCount"/> </xsl:otherwise> </xsl:choose> </xsl:template> <!--FieldDefinition reference: must pass a Field node under the BaseTable node! --> <xsl:template name="FieldDefinitionReference"> <xsl:param name="inFieldDefinition"/> <xsl:call-template name="FullFieldLink-WithAnchor"> <xsl:with-param name="inAnchor" select="concat('#',$inFieldDefinition/ancestor::BaseTable/@name, $inFieldDefinition/@name, $kAnchorField)"/> <xsl:with-param name="inTableName" select="$inFieldDefinition/ancestor::BaseTable/@name"/> <xsl:with-param name="inFieldName" select="$inFieldDefinition/@name"/> </xsl:call-template> </xsl:template> <!-- Field reference: must pass a Field node! --> <xsl:template name="FieldReference-ShowTableAlias"> <xsl:param name="inField"/> <xsl:variable name="tableAlias" select="/FMPReport/File/RelationshipGraph/TableList/Table[@name = $inField/@table]"/> <xsl:variable name="fileReference" select="/FMPReport/File/FileReferenceCatalog/FileReference[@name = $tableAlias/FileReference/@name]"/> <xsl:choose> <xsl:when test="$tableAlias"> <xsl:choose> <xsl:when test="$tableAlias/FileReference"> <xsl:choose> <xsl:when test="$fileReference/@link"> <xsl:call-template name="FullFieldLink-WithAnchor"> <xsl:with-param name="inAnchor" select="concat($fileReference/@link,'#',$tableAlias/@baseTable, $inField/@name, $kAnchorField)"/> <xsl:with-param name="inTableName" select="$inField/@table"/> <xsl:with-param name="inFieldName" select="$inField/@name"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <em><xsl:value-of select="$inField/@table"/></em><xsl:value-of select="concat('::', $inField/@name)"/> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise> <xsl:call-template name="FullFieldLink-WithAnchor"> <xsl:with-param name="inAnchor" select="concat('#',$tableAlias/@baseTable, $inField/@name, $kAnchorField)"/> <xsl:with-param name="inTableName" select="$inField/@table"/> <xsl:with-param name="inFieldName" select="$inField/@name"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise> <em><xsl:value-of select="$inField/@table"/></em><xsl:value-of select="concat('::', $inField/@name)"/> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="FieldReference-ShowBaseTable"> <xsl:param name="inField"/> <xsl:variable name="tableAlias" select="/FMPReport/File/RelationshipGraph/TableList/Table[@name = $inField/@table]"/> <xsl:variable name="fileReference" select="/FMPReport/File/FileReferenceCatalog/FileReference[@name = $tableAlias/FileReference/@name]"/> <xsl:choose> <xsl:when test="$tableAlias"> <xsl:choose> <xsl:when test="$tableAlias/FileReference"> <xsl:choose> <xsl:when test="$fileReference/@link"> <xsl:call-template name="Link-WithAnchor"> <xsl:with-param name="inAnchor" select="concat($fileReference/@link,'#',$tableAlias/@baseTable, $inField/@name,$kAnchorField)"/> <xsl:with-param name="inDisplayText" select="concat($tableAlias/@baseTable, '::', $inField/@name)"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select="$inField/@name"/> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise> <xsl:call-template name="Link-WithAnchor"> <xsl:with-param name="inAnchor" select="concat('#',$tableAlias/@baseTable, $inField/@name, $kAnchorField)"/> <xsl:with-param name="inDisplayText" select="concat($tableAlias/@baseTable, '::', $inField/@name)"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise> <xsl:value-of select="$inField/@name"/> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="FieldReference-ShowFieldNameOnly"> <xsl:param name="inField"/> <xsl:variable name="tableAlias" select="/FMPReport/File/RelationshipGraph/TableList/Table[@name = $inField/@table]"/> <xsl:variable name="fileReference" select="/FMPReport/File/FileReferenceCatalog/FileReference[@name = $tableAlias/FileReference/@name]"/> <xsl:choose> <xsl:when test="$tableAlias"> <xsl:choose> <xsl:when test="$tableAlias/FileReference"> <xsl:choose> <xsl:when test="$fileReference/@link"> <xsl:call-template name="Link-WithAnchor"> <xsl:with-param name="inAnchor" select="concat($fileReference/@link,'#', $tableAlias/@baseTable, $inField/@name,$kAnchorField)"/> <xsl:with-param name="inDisplayText" select="$inField/@name"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select="$inField/@name"/> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise> <xsl:call-template name="Link-WithAnchor"> <xsl:with-param name="inAnchor" select="concat('#',$tableAlias/@baseTable, $inField/@name, $kAnchorField)"/> <xsl:with-param name="inDisplayText" select="$inField/@name"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise> <xsl:value-of select="$inField/@name"/> </xsl:otherwise> </xsl:choose> </xsl:template> <!-- BaseTable reference: must pass a BaseTable name!--> <xsl:template name="BaseTableReference"> <xsl:param name="inBaseTable"/> <xsl:variable name="baseTable" select="/FMPReport/File/BaseTableCatalog/BaseTable[@name = $inBaseTable]"/> <!-- Check to see if there is a BaseTable node under BaseTableCatalog! --> <xsl:choose> <xsl:when test="$baseTable"> <xsl:call-template name="Link-WithAnchor"> <xsl:with-param name="inAnchor" select="concat('#',$inBaseTable, $kAnchorBaseTable)"/> <xsl:with-param name="inDisplayText" select="$inBaseTable"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select="$inBaseTable"/> </xsl:otherwise> </xsl:choose> </xsl:template> <!--TableAlias reference: must pass a Table node! --> <xsl:template name="TableAliasReference"> <xsl:param name="inTableAlias"/> <xsl:choose> <xsl:when test="$inTableAlias/FileReference"> <xsl:variable name="fileRef" select="/FMPReport/File/FileReferenceCatalog/FileReference[@name=$inTableAlias/FileReference/@name]"/> <xsl:choose> <xsl:when test="$fileRef/@link"> <xsl:call-template name="ItalicLink-WithAnchor"> <xsl:with-param name="inAnchor" select="concat($fileRef/@link, '#',$inTableAlias/@name, $kAnchorTable)"/> <xsl:with-param name="inDisplayText" select="$inTableAlias/@name"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <em><xsl:value-of select="$inTableAlias/@name"/></em> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise> <xsl:call-template name="ItalicLink-WithAnchor"> <xsl:with-param name="inAnchor" select="concat('#', $inTableAlias/@name, $kAnchorTable)"/> <xsl:with-param name="inDisplayText" select="$inTableAlias/@name"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:template> <!--Base table reference given a table alias/occurrence --> <xsl:template name="BaseTableRefGivenTableAlias"> <xsl:param name="inTableAlias"/> <xsl:choose> <!-- External base table references --> <xsl:when test="$inTableAlias/FileReference"> <xsl:variable name="fileRef" select="/FMPReport/File/FileReferenceCatalog/FileReference[@name = $inTableAlias/FileReference/@name]"/> <xsl:choose> <xsl:when test="$fileRef/@link"> <xsl:call-template name="Link-WithAnchor"> <xsl:with-param name="inAnchor" select="concat($fileRef/@link,'#', $inTableAlias/@baseTable,$kAnchorBaseTable)"/> <xsl:with-param name="inDisplayText" select="$inTableAlias/@baseTable"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select="$inTableAlias/@baseTable"/> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise> <!-- Internal references --> <xsl:call-template name="BaseTableReference"> <xsl:with-param name="inBaseTable" select="$inTableAlias/@baseTable"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:template> <!-- File Reference references --> <xsl:template name="FileRefReference"> <xsl:param name="inFileReference"/> <xsl:variable name="fileRef" select="/FMPReport/File/FileReferenceCatalog/FileReference[@name=$inFileReference/@name]"/> <xsl:choose> <xsl:when test="$fileRef"> <xsl:call-template name="Link-WithAnchor"> <xsl:with-param name="inAnchor" select="concat('#', $inFileReference/@name, $kAnchorFileReference)"/> <xsl:with-param name="inDisplayText" select="$inFileReference/@name"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select="$inFileReference/@name"/> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="FileRefAnchor"> <xsl:param name="inFileReference"/> <xsl:call-template name="AnchorPoint"> <xsl:with-param name="inAnchor" select="concat($inFileReference/@name, $kAnchorFileReference)"/> <xsl:with-param name="inDisplayText" select="$inFileReference/@name"/> </xsl:call-template> </xsl:template> <!--Layout reference: must pass a Layout node! --> <xsl:template name="LayoutReference"> <xsl:param name="inLayout"/> <xsl:choose> <xsl:when test="/FMPReport/File/LayoutCatalog/Layout[(@name = $inLayout/@name) and (@id = $inLayout/@id)]"> <xsl:call-template name="Link-WithAnchor"> <xsl:with-param name="inAnchor" select="concat('#',$inLayout/@name, $inLayout/@id, $kAnchorLayout)"/> <xsl:with-param name="inDisplayText" select="$inLayout/@name"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select="$inLayout/@name"/> </xsl:otherwise> </xsl:choose> </xsl:template> <!--Value list reference: must pass a ValueList node! --> <xsl:template name="VLReference"> <xsl:param name="inVL"/> <xsl:choose> <xsl:when test="/FMPReport/File/ValueListCatalog/ValueList[@name = $inVL/@name]"> <xsl:call-template name="Link-WithAnchor"> <xsl:with-param name="inAnchor" select="concat('#',$inVL/@name, $kAnchorVL)"/> <xsl:with-param name="inDisplayText" select="$inVL/@name"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select="$inVL/@name"/> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="VLAnchor"> <xsl:param name="inVL"/> <xsl:call-template name="AnchorPoint"> <xsl:with-param name="inAnchor" select="concat($inVL/@name, $kAnchorVL)"/> <xsl:with-param name="inDisplayText" select="$inVL/@name"/> </xsl:call-template> </xsl:template> <!--External value list reference: must pass a ValueList and FileReference node! --> <xsl:template name="ExternalVLReference"> <xsl:param name="inExternalVL"/> <xsl:param name="inFileRef"/> <xsl:variable name="fileRef" select="/FMPReport/File/FileReferenceCatalog/FileReference[@name=$inFileRef/@name]"/> <xsl:choose> <xsl:when test="$fileRef/@link"> <xsl:call-template name="Link-WithAnchor"> <xsl:with-param name="inAnchor" select="concat($fileRef/@link,'#', $inExternalVL/@name,$kAnchorVL)"/> <xsl:with-param name="inDisplayText" select="$inExternalVL/@name"/> </xsl:call-template> </xsl:when> <xsl:otherwise><xsl:value-of select="$inExternalVL/@name"/></xsl:otherwise> </xsl:choose> </xsl:template> <!--Script reference: must pass a Script node! --> <xsl:template name="ScriptReference"> <xsl:param name="inScript"/> <xsl:choose> <xsl:when test="/FMPReport/File/ScriptCatalog/Script[(@name = $inScript/@name) and (@id = $inScript/@id)]"> <xsl:call-template name="Link-WithAnchor"> <xsl:with-param name="inAnchor" select="concat('#', $inScript/@name, $inScript/@id, $kAnchorScript)"/> <xsl:with-param name="inDisplayText" select="$inScript/@name"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select="$inScript/@name"/> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="ExternalScriptReference"> <xsl:param name="inFileRef"/> <xsl:param name="inScript"/> <xsl:variable name="fileRef" select="/FMPReport/File/FileReferenceCatalog/FileReference[@name=$inFileRef/@name]"/> <xsl:choose> <xsl:when test="$fileRef/@link"> <xsl:call-template name="Link-WithAnchor"> <xsl:with-param name="inAnchor" select="concat($fileRef/@link,'#', $inScript/@name, $inScript/@id,$kAnchorScript)"/> <xsl:with-param name="inDisplayText" select="$inScript/@name"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select="$inScript/@name"/> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="ScriptAnchor"> <xsl:param name="inScript"/> <xsl:call-template name="AnchorPoint"> <xsl:with-param name="inAnchor" select="concat($inScript/@name, $inScript/@id, $kAnchorScript)"/> <xsl:with-param name="inDisplayText" select="$inScript/@name"/> </xsl:call-template> </xsl:template> <!-- Account reference --> <xsl:template name="AccountReference"> <xsl:param name="inAccount"/> <xsl:choose> <xsl:when test="/FMPReport/File/AccountCatalog/Account[@name = $inAccount/@name]"> <xsl:call-template name="Link-WithAnchor"> <xsl:with-param name="inAnchor" select="concat('#', $inAccount/@name,$kAnchorAccount)"/> <xsl:with-param name="inDisplayText" select="$inAccount/@name"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select="$inAccount/@name"/> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="AccountAnchor"> <xsl:param name="inAccount"/> <xsl:call-template name="AnchorPoint"> <xsl:with-param name="inAnchor" select="concat($inAccount/@name, $kAnchorAccount)"/> <xsl:with-param name="inDisplayText" select="$inAccount/@name"/> </xsl:call-template> </xsl:template> <xsl:template name="PrivilegeSetAnchor"> <xsl:param name="inPrivilegeSet"/> <xsl:call-template name="AnchorPoint"> <xsl:with-param name="inAnchor" select="concat($inPrivilegeSet/@name, $kAnchorPrivilegeSet)"/> <xsl:with-param name="inDisplayText" select="$inPrivilegeSet/@name"/> </xsl:call-template> </xsl:template> <xsl:template name="PrivilegeSetReference"> <xsl:param name="inPrivilegeSetName"/> <xsl:choose> <xsl:when test="/FMPReport/File/PrivilegesCatalog/PrivilegeSet[@name = $inPrivilegeSetName]"> <xsl:call-template name="Link-WithAnchor"> <xsl:with-param name="inAnchor" select="concat('#', $inPrivilegeSetName,$kAnchorPrivilegeSet)"/> <xsl:with-param name="inDisplayText" select="$inPrivilegeSetName"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select="$inPrivilegeSetName"/> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="ExtendedPrivilegeAnchor"> <xsl:param name="inExtendedPrivilege"/> <xsl:call-template name="AnchorPoint"> <xsl:with-param name="inAnchor" select="concat($inExtendedPrivilege/@name, $kAnchorExtendedPrivilege)"/> <xsl:with-param name="inDisplayText" select="$inExtendedPrivilege/@name"/> </xsl:call-template> </xsl:template> <xsl:template name="ExtendedPrivilegeReference"> <xsl:param name="inExtendedPrivilege"/> <xsl:choose> <xsl:when test="/FMPReport/File/ExtendedPrivilegeCatalog/ExtendedPrivilege[@name = $inExtendedPrivilege/@name]"> <xsl:call-template name="Link-WithAnchor"> <xsl:with-param name="inAnchor" select="concat('#', $inExtendedPrivilege/@name,$kAnchorExtendedPrivilege)"/> <xsl:with-param name="inDisplayText" select="$inExtendedPrivilege/@name"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select="$inExtendedPrivilege/@name"/> </xsl:otherwise> </xsl:choose> </xsl:template> <!-- BaseTable anchor: location to anchor to. Must be a BaseTable name! --> <xsl:template name="BaseTableAnchor"> <xsl:param name="inBaseTable"/> <xsl:call-template name="AnchorPoint"> <xsl:with-param name="inAnchor" select="concat($inBaseTable, $kAnchorBaseTable)"/> <xsl:with-param name="inDisplayText" select="$inBaseTable"/> </xsl:call-template> </xsl:template> <!-- Field anchor: location to anchor to. Pass in a field name and base table! --> <xsl:template name="FieldAnchor"> <xsl:param name="inField"/> <xsl:param name="inBaseTable"/> <xsl:call-template name="AnchorPoint"> <xsl:with-param name="inAnchor" select="concat($inBaseTable, $inField, $kAnchorField)"/> <xsl:with-param name="inDisplayText" select="$inField"/> </xsl:call-template> </xsl:template> <!-- Layout anchor: location to anchor to. Pass in a Layout node! --> <xsl:template name="LayoutAnchor"> <xsl:param name="inLayout"/> <xsl:call-template name="AnchorPoint"> <xsl:with-param name="inAnchor" select="concat($inLayout/@name,$inLayout/@id, $kAnchorLayout)"/> <xsl:with-param name="inDisplayText" select="$inLayout/@name"/> </xsl:call-template> </xsl:template> <!--Table section anchor. --> <xsl:template name="TableSectionAnchor"> <xsl:call-template name="AnchorPoint"> <xsl:with-param name="inAnchor" select="concat($valTables, $kAnchorSection)"/> <xsl:with-param name="inDisplayText" select="$valTables"/> </xsl:call-template> </xsl:template> <!--Field section anchor. --> <xsl:template name="FieldSectionAnchor"> <xsl:call-template name="AnchorPoint"> <xsl:with-param name="inAnchor" select="concat($valFields, $kAnchorSection)"/> <xsl:with-param name="inDisplayText" select="$valFields"/> </xsl:call-template> </xsl:template> <!-- Table occurrence/alias anchor --> <xsl:template name="TableAliasAnchor"> <xsl:param name="inTableAlias"/> <xsl:call-template name="TableAnchorPoint"> <xsl:with-param name="inAnchor" select="concat($inTableAlias/@name, $kAnchorTable)"/> <xsl:with-param name="inDisplayText" select="$inTableAlias/@name"/> </xsl:call-template> </xsl:template> <xsl:template name="CustomFunctionReference"> <xsl:param name="inCustomFunctionName"/> <xsl:choose> <xsl:when test="/FMPReport/File/CustomFunctionCatalog/CustomFunction[@name = $inCustomFunctionName]"> <xsl:call-template name="Link-WithAnchor"> <xsl:with-param name="inAnchor" select="concat('#',$inCustomFunctionName, $kAnchorCustomFunction)"/> <xsl:with-param name="inDisplayText" select="$inCustomFunctionName"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select="$inCustomFunctionName"/> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="CustomFunctionAnchor"> <xsl:param name="inCustomFunction"/> <xsl:call-template name="AnchorPoint"> <xsl:with-param name="inAnchor" select="concat($inCustomFunction/@name, $kAnchorCustomFunction)"/> <xsl:with-param name="inDisplayText" select="$inCustomFunction/@name"/> </xsl:call-template> </xsl:template> <!-- Template for generating calculations --> <!-- Must pass in a DisplayCalc node --> <xsl:template name="GenerateCalc"> <xsl:param name="inDisplayCalc"/> <!-- Process the Chunks --> <xsl:for-each select="$inDisplayCalc/Chunk"> <xsl:choose> <xsl:when test="@type='CustomFunctionRef'"> <xsl:call-template name="CustomFunctionReference"> <xsl:with-param name="inCustomFunctionName" select="."/> </xsl:call-template> </xsl:when> <xsl:when test="@type='FunctionRef'"> <strong><xsl:value-of select="."/></strong> </xsl:when> <xsl:when test="@type='NoRef'"> <xsl:value-of select="."/> </xsl:when> <xsl:when test="@type='FieldRef'"> <xsl:call-template name="FieldReference-ShowTableAlias"> <xsl:with-param name="inField" select="Field"/> </xsl:call-template> </xsl:when> </xsl:choose> </xsl:for-each> </xsl:template> <!-- Template to generate a list of table aliases of a base table --> <xsl:template name="TableAliasList"> <xsl:param name="inBaseTable"/> <xsl:variable name="tableAliases" select="key('TableAlias-BaseTableIndex', $inBaseTable)[not(FileReference)]"/> <xsl:for-each select="$tableAliases"> <!-- We can do this test because table alias names are guaranteed to be unique --> <xsl:if test="@name!= $tableAliases[1]/@name"> <xsl:text>, </xsl:text> </xsl:if> <xsl:call-template name="TableAliasReference"> <xsl:with-param name="inTableAlias" select="."/> </xsl:call-template> </xsl:for-each> </xsl:template> <!-- Template for fetching the field type information. --> <xsl:template name="FieldType"> <xsl:param name="inFieldType"/> <xsl:choose> <xsl:when test="$inFieldType = 'Normal'"><xsl:value-of select="$valNormal"/></xsl:when> <xsl:when test="$inFieldType = 'Calculated'"><xsl:value-of select="$valCalculated"/></xsl:when> <xsl:when test="$inFieldType = 'Summary'"><xsl:value-of select="$valSummary"/></xsl:when> </xsl:choose> </xsl:template> <!-- Template for fetching the field type information. --> <xsl:template name="DataType"> <xsl:param name="inDataType"/> <xsl:choose> <xsl:when test="$inDataType='Text'"><xsl:value-of select="$valDataTypeText"/></xsl:when> <xsl:when test="$inDataType='Number'"><xsl:value-of select="$valDataTypeNumber"/></xsl:when> <xsl:when test="$inDataType='Date'"><xsl:value-of select="$valDataTypeDate"/></xsl:when> <xsl:when test="$inDataType='Time'"><xsl:value-of select="$valDataTypeTime"/></xsl:when> <xsl:when test="$inDataType='TimeStamp'"><xsl:value-of select="$valDataTypeTimeStamp"/></xsl:when> <xsl:when test="$inDataType='Binary'"><xsl:value-of select="$valDataTypeBinary"/></xsl:when> </xsl:choose> </xsl:template> <!-- AutoEnter values --> <xsl:template name="AutoEnterValue"> <xsl:param name="inAutoEnterValue"/> <xsl:choose> <xsl:when test="$inAutoEnterValue = 'CreationTime'"><xsl:value-of select="$valCreationTime"/></xsl:when> <xsl:when test="$inAutoEnterValue = 'CreationDate'"><xsl:value-of select="$valCreationDate"/></xsl:when> <xsl:when test="$inAutoEnterValue = 'CreationTimeStamp'"><xsl:value-of select="$valCreationTimeStamp"/></xsl:when> <xsl:when test="$inAutoEnterValue = 'CreationName'"><xsl:value-of select="$valCreationName"/></xsl:when> <xsl:when test="$inAutoEnterValue = 'CreationAccountName'"><xsl:value-of select="$valCreationAccountName"/></xsl:when> <xsl:when test="$inAutoEnterValue = 'ModificationDate'"><xsl:value-of select="$valModificationDate"/></xsl:when> <xsl:when test="$inAutoEnterValue = 'ModificationTime'"><xsl:value-of select="$valModificationTime"/></xsl:when> <xsl:when test="$inAutoEnterValue = 'ModificationTimeStamp'"><xsl:value-of select="$valModificationTimeStamp"/></xsl:when> <xsl:when test="$inAutoEnterValue = 'ModificationName'"><xsl:value-of select="$valModificationName"/></xsl:when> <xsl:when test="$inAutoEnterValue = 'ModificationAccountName'"><xsl:value-of select="$valModificationAccountName"/></xsl:when> <xsl:when test="$inAutoEnterValue = 'PreviousRecord'"><xsl:value-of select="$valPreviousRecord"/></xsl:when> <xsl:when test="$inAutoEnterValue = 'ConstantData'"><xsl:value-of select="$valConstantData"/></xsl:when> </xsl:choose> </xsl:template> <xsl:template name="LookupCopyMatchValue"> <xsl:param name="inLookupValue"/> <xsl:choose> <xsl:when test="$inLookupValue = 'DoNotCopy'"><xsl:value-of select="$valDoNotCopy"/></xsl:when> <xsl:when test="$inLookupValue = 'CopyNextHigher'"><xsl:value-of select="$valCopyNextHigher"/></xsl:when> <xsl:when test="$inLookupValue = 'CopyNextLower'"><xsl:value-of select="$valCopyNextLower"/></xsl:when> <xsl:when test="$inLookupValue = 'CopyConstant'"><xsl:value-of select="$valCopyConstant"/></xsl:when> </xsl:choose> </xsl:template> <!-- AutoEnter Serial value --> <xsl:template name="AutoEnterSerialValue"> <xsl:param name="inSerialValue"/> <xsl:choose> <xsl:when test="$inSerialValue = 'OnCommit'"><xsl:value-of select="$valOnCommit"/></xsl:when> <xsl:when test="$inSerialValue = 'OnCreation'"><xsl:value-of select="$valOnCreate"/></xsl:when> </xsl:choose> </xsl:template> <!-- Generate the report overview table --> <xsl:template name="Table-Overview"> <xsl:param name="inFile"/> <p> <span class="partheading"> <xsl:call-template name="AnchorPoint"> <xsl:with-param name="inAnchor" select="concat($valFileOptionOverview, $kAnchorSection)"/> <xsl:with-param name="inDisplayText" select="$inFile/@name"/> </xsl:call-template> </span> </p> <table width="100%" border="1"> <tbody> <tr vAlign="top"> <td class="chartsubheads" colSpan="2"> <xsl:value-of select="$valOverview"/> </td> <td class="chartsubheads" width="1%"> </td> <td class="chartsubheads" colSpan="2"> <xsl:value-of select="$valFileOptions"/> </td> </tr> <tr vAlign="top"> <td class="chartheadersnobg" width="32%"> <xsl:value-of select="$valTables"/> </td> <td class="regularcharttext" width="8%"> <xsl:call-template name="SectionReference"> <xsl:with-param name="inSection" select="$valTables"/> <xsl:with-param name="inCount" select="count($inFile/BaseTableCatalog/BaseTable)"/> </xsl:call-template> </td> <td class="regularcharttext"> </td> <td class="chartsubheads" colSpan="2"> <xsl:value-of select="$valWhenOpeningFile"/> </td> </tr> <tr vAlign="top"> <td class="chartheadersnobg"> <xsl:value-of select="$valRelationships"/> </td> <td class="regularcharttext"> <xsl:call-template name="SectionReference"> <xsl:with-param name="inSection" select="$valRelationships"/> <xsl:with-param name="inCount" select="count($inFile/RelationshipGraph/RelationshipList/Relationship)"/> </xsl:call-template> </td> <td class="regularcharttext"> </td> <td class="chartheadersnobg" width="%26"> <xsl:value-of select="$valLoginUsing"/> </td> <td class="regularcharttext" width="33%"> <xsl:choose> <xsl:when test="/FMPReport/File/Options/OnOpen/Account"> <xsl:value-of select="concat($valAccountName,'; ',$valAccount,'= ')"/> <xsl:call-template name="AccountReference"> <xsl:with-param name="inAccount" select="/FMPReport/File/Options/OnOpen/Account"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select="$valOff"/> </xsl:otherwise> </xsl:choose> </td> </tr> <tr vAlign="top"> <td class="chartheadersnobg"> <xsl:value-of select="$valLayouts"/> </td> <td class="regularcharttext"> <xsl:call-template name="SectionReference"> <xsl:with-param name="inSection" select="$valLayouts"/> <xsl:with-param name="inCount" select="count($inFile/LayoutCatalog/Layout)"/> </xsl:call-template> </td> <td class="regularcharttext"> </td> <td class="chartheadersnobg"> <xsl:value-of select="$valSwitchToLayout"/> </td> <td class="regularcharttext"> <xsl:choose> <xsl:when test="/FMPReport/File/Options/OnOpen/Layout"> <xsl:call-template name="LayoutReference"> <xsl:with-param name="inLayout" select="/FMPReport/File/Options/OnOpen/Layout"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select="$valOff"/> </xsl:otherwise> </xsl:choose> </td> </tr> <tr vAlign="top"> <td class="chartheadersnobg"> <xsl:value-of select="$valScripts"/> </td> <td class="regularcharttext"> <xsl:call-template name="SectionReference"> <xsl:with-param name="inSection" select="$valScripts"/> <xsl:with-param name="inCount" select="count($inFile/ScriptCatalog/Script)"/> </xsl:call-template> </td> <td class="regularcharttext"> </td> <td class="chartheadersnobg"> <xsl:value-of select="$valPerformScript"/> </td> <td class="regularcharttext"> <xsl:choose> <xsl:when test="/FMPReport/File/Options/OnOpen/Script"> <xsl:call-template name="ScriptReference"> <xsl:with-param name="inScript" select="/FMPReport/File/Options/OnOpen/Script"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select="$valOff"/> </xsl:otherwise> </xsl:choose> </td> </tr> <tr vAlign="top"> <td class="chartheadersnobg"> <xsl:value-of select="$valValueLists"/> </td> <td class="regularcharttext"> <xsl:call-template name="SectionReference"> <xsl:with-param name="inSection" select="$valValueLists"/> <xsl:with-param name="inCount" select="count($inFile/ValueListCatalog/ValueList)"/> </xsl:call-template> </td> <td class="regularcharttext"> </td> <td class="chartsubheads" colSpan="2"> <xsl:value-of select="$valWhenClosingFile"/> </td> </tr> <tr vAlign="top"> <td class="chartheadersnobg"> <xsl:value-of select="$valCustomFunctions"/> </td> <td class="regularcharttext"> <xsl:call-template name="SectionReference"> <xsl:with-param name="inSection" select="$valCustomFunctions"/> <xsl:with-param name="inCount" select="count($inFile/CustomFunctionCatalog/CustomFunction)"/> </xsl:call-template> </td> <td class="regularcharttext"> </td> <td class="chartheadersnobg"> <xsl:value-of select="$valPerformScript"/> </td> <td class="regularcharttext"> <xsl:choose> <xsl:when test="/FMPReport/File/Options/OnClose/Script"> <xsl:call-template name="ScriptReference"> <xsl:with-param name="inScript" select="/FMPReport/File/Options/OnClose/Script"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select="$valOff"/> </xsl:otherwise> </xsl:choose> </td> </tr> <tr vAlign="top"> <td class="chartheadersnobg"> <xsl:value-of select="$valAccounts"/> </td> <td class="regularcharttext"> <xsl:call-template name="SectionReference"> <xsl:with-param name="inSection" select="$valAccounts"/> <xsl:with-param name="inCount" select="count($inFile/AccountCatalog/Account)"/> </xsl:call-template> </td> </tr> <tr vAlign="top"> <td class="chartheadersnobg"> <xsl:value-of select="$valPrivilegeSets"/> </td> <td class="regularcharttext"> <xsl:call-template name="SectionReference"> <xsl:with-param name="inSection" select="$valPrivilegeSets"/> <xsl:with-param name="inCount" select="count($inFile/PrivilegesCatalog/PrivilegeSet)"/> </xsl:call-template> </td> </tr> <tr vAlign="top"> <td class="chartheadersnobg"> <xsl:value-of select="$valExtendedPrivileges"/> </td> <td class="regularcharttext"> <xsl:call-template name="SectionReference"> <xsl:with-param name="inSection" select="$valExtendedPrivileges"/> <xsl:with-param name="inCount" select="count($inFile/ExtendedPrivilegeCatalog/ExtendedPrivilege)"/> </xsl:call-template> </td> </tr> <tr vAlign="top"> <td class="chartheadersnobg"> <xsl:value-of select="$valFileReferences"/> </td> <td class="regularcharttext"> <xsl:call-template name="SectionReference"> <xsl:with-param name="inSection" select="$valFileReferences"/> <xsl:with-param name="inCount" select="count($inFile/FileReferenceCatalog/FileReference)"/> </xsl:call-template> </td> </tr> </tbody> </table> </xsl:template> <!-- Template for generating Auto-Enter information for field --> <!-- Must pass in an AutoEnter node --> <xsl:template name="Table-AutoEnter"> <xsl:param name="inAutoEnter"/> <xsl:if test="$inAutoEnter and (($inAutoEnter/ancestor::Field/@fieldType != 'Calculated') or ($inAutoEnter/@alwaysEvaluate = 'True'))"> <strong><xsl:value-of select="concat($valAutoEnter,':')"/></strong> <ul> <xsl:if test="$inAutoEnter/@value"> <li> <xsl:call-template name="AutoEnterValue"> <xsl:with-param name="inAutoEnterValue" select="$inAutoEnter/@value"/> </xsl:call-template> <xsl:if test="$inAutoEnter/ConstantData"> <xsl:value-of select="concat(': ', $inAutoEnter/ConstantData)"/> </xsl:if> </li> </xsl:if> <xsl:if test="$inAutoEnter/@alwaysEvaluate = 'True'"> <li> <xsl:value-of select="$valAlwaysEvaluate"/> </li> </xsl:if> <xsl:if test="$inAutoEnter/@allowEditing = 'True'"> <li> <xsl:value-of select="$valAllowEditing"/> </li> </xsl:if> <xsl:if test="$inAutoEnter/@overwriteExistingValue = 'False'"> <li> <xsl:value-of select="$valDoNotReplaceExisting"/> </li> </xsl:if> <xsl:if test="$inAutoEnter/Serial"> <li> <xsl:value-of select="concat($valSerial, ': ', $valGenerate, ': ')"/> <xsl:call-template name="AutoEnterSerialValue"> <xsl:with-param name="inSerialValue" select="$inAutoEnter/Serial/@generate"/> </xsl:call-template> <xsl:value-of select="concat(', ', $valNextValue, ': ', $inAutoEnter/Serial/@nextValue, ', ', $valIncrement, ': ', $inAutoEnter/Serial/@increment)"/> </li> </xsl:if> <xsl:if test="$inAutoEnter/DisplayCalculation"> <li> <xsl:value-of select="concat($valCalculation, ': ')"/> <xsl:call-template name="GenerateCalc"> <xsl:with-param name="inDisplayCalc" select="$inAutoEnter/DisplayCalculation"/> </xsl:call-template> </li> </xsl:if> <xsl:if test="$inAutoEnter/Lookup"> <li> <xsl:value-of select="concat($valLookup, ': ')"/> <xsl:if test="$inAutoEnter/Lookup/Field"> <xsl:call-template name="FieldReference-ShowTableAlias"> <xsl:with-param name="inField" select="$inAutoEnter/Lookup/Field"/> </xsl:call-template> </xsl:if> <xsl:if test="$inAutoEnter/Lookup/NoMatchCopyOption"> <xsl:text>, </xsl:text> <xsl:call-template name="LookupCopyMatchValue"> <xsl:with-param name="inLookupValue" select="$inAutoEnter/Lookup/NoMatchCopyOption/@value"/> </xsl:call-template> <xsl:if test="$inAutoEnter/Lookup/NoMatchCopyOption/@value = 'CopyConstant'"> <xsl:value-of select="concat(': ',$inAutoEnter/Lookup/CopyConstantValue)"/> </xsl:if> </xsl:if> <xsl:if test="$inAutoEnter/Lookup/CopyEmptyContent/@value = 'False'"> <xsl:text>, </xsl:text> <xsl:value-of select="$valDoNotCopyContent"/> </xsl:if> </li> </xsl:if> </ul> </xsl:if> </xsl:template> <!-- Template for generating Validation information for field --> <!-- Must pass in an Validation node --> <xsl:template name="Table-Validation"> <xsl:param name="inValidation"/> <xsl:if test="$inValidation"> <strong><xsl:value-of select="concat($valValidation,':')"/></strong> <ul> <li> <xsl:choose> <xsl:when test="$inValidation/@type = 'Always'"> <xsl:value-of select="$valAlwaysValidate"/> </xsl:when> <xsl:when test="$inValidation/@type = 'OnlyDuringDataEntry'"> <xsl:value-of select="$valOnlyDuringDataEntry"/> </xsl:when> </xsl:choose> </li> <xsl:if test="$inValidation/StrictDataType"> <li> <xsl:value-of select="concat($valStrictDataType,': ')"/> <xsl:choose> <xsl:when test="$inValidation/StrictDataType/@value = 'FourDigitYear'"> <xsl:value-of select="$valFourDigitYear"/> </xsl:when> <xsl:when test="$inValidation/StrictDataType/@value = 'Numeric'"> <xsl:value-of select="$valNumeric"/> </xsl:when> <xsl:when test="$inValidation/StrictDataType/@value = 'TimeOfDay'"> <xsl:value-of select="$valTimeOfDay"/> </xsl:when> </xsl:choose> </li> </xsl:if> <xsl:if test="$inValidation/NotEmpty/@value = 'True'"> <li> <xsl:value-of select="$valNotEmpty"/> </li> </xsl:if> <xsl:if test="$inValidation/Unique/@value = 'True'"> <li> <xsl:value-of select="$valUnique"/> </li> </xsl:if> <xsl:if test="$inValidation/Existing/@value = 'True'"> <li> <xsl:value-of select="$valExisting"/> </li> </xsl:if> <xsl:if test="$inValidation/StrictValidation/@value = 'True'"> <li> <xsl:value-of select="$valStrictValidation"/> </li> </xsl:if> <xsl:if test="$inValidation/ValueList"> <li> <xsl:value-of select="concat($valValueList,': ')"/> <xsl:call-template name="VLReference"> <xsl:with-param name="inVL" select="$inValidation/ValueList"/> </xsl:call-template> </li> </xsl:if> <xsl:if test="$inValidation/Range"> <li> <xsl:value-of select="concat($valRange,': ', $inValidation/Range/@from, ' - ', $inValidation/Range/@to)"/> </li> </xsl:if> <xsl:if test="$inValidation/MaxDataLength"> <li> <xsl:value-of select="concat($valMaxDataLength,': ', $inValidation/MaxDataLength/@value)"/> </li> </xsl:if> <xsl:if test="$inValidation/ErrorMessage"> <li> <xsl:value-of select="concat($valErrorMessage, ': ', $inValidation/ErrorMessage)"/> </li> </xsl:if> <xsl:if test="$inValidation/DisplayCalculation"> <li> <xsl:value-of select="concat($valCalculation, ': ')"/> <xsl:call-template name="GenerateCalc"> <xsl:with-param name="inDisplayCalc" select="$inValidation/DisplayCalculation"/> </xsl:call-template> </li> </xsl:if> </ul> </xsl:if> </xsl:template> <!-- Template for generating Storage information for field --> <!-- Must pass in an Storage node --> <xsl:template name="Table-Storage"> <xsl:param name="inStorage"/> <xsl:if test="$inStorage"> <strong><xsl:value-of select="concat($valStorage,':')"/></strong> <ul> <xsl:if test="$inStorage/@global = 'True'"> <li> <xsl:value-of select="$valGlobal"/> </li> </xsl:if> <li> <xsl:value-of select="concat($valRepetitions,': ', $inStorage/@maxRepetition)"/> </li> <xsl:if test="$inStorage/@index"> <li> <xsl:value-of select="concat($valIndexing,': ')"/> <xsl:call-template name="IndexValue"> <xsl:with-param name="indexValue" select="$inStorage/@index"/> </xsl:call-template> </li> </xsl:if> <xsl:if test="$inStorage/@autoIndex = 'True'"> <li> <xsl:value-of select="$valAutoTurnIndexOn"/> </li> </xsl:if> <xsl:if test="$inStorage/@storeCalculationResults = 'False'"> <li> <xsl:value-of select="$valDoNotStoreCalcResults"/> </li> </xsl:if> <xsl:if test="$inStorage/@indexLanguage"> <li> <xsl:value-of select="concat($valIndexLanguage,': ')"/> <xsl:call-template name="Language"> <xsl:with-param name="inLang" select="$inStorage/@indexLanguage"/> </xsl:call-template> </li> </xsl:if> </ul> </xsl:if> </xsl:template> <!-- Must pass in an Furigana node --> <xsl:template name="Table-Furigana"> <xsl:param name="inFurigana"/> <xsl:if test="$inFurigana"> <strong><xsl:value-of select="concat($valFurigana,':')"/></strong> <ul> <xsl:if test="$inFurigana/Field"> <li> <xsl:value-of select="concat($valUseFuriganaField,': ')"/> <xsl:call-template name="FieldDefinitionReference"> <xsl:with-param name="inFieldDefinition" select="$inFurigana/Field"/> </xsl:call-template> </li> </xsl:if> <li> <xsl:value-of select="concat($valTranslateInto,': ')"/> <xsl:choose> <xsl:when test="$inFurigana/@inputMode = 'AsEntered'"> <xsl:value-of select="$valAsIs"/> </xsl:when> <xsl:when test="$inFurigana/@inputMode = 'Hiragana'"> <xsl:value-of select="$valHiragana"/> </xsl:when> <xsl:when test="$inFurigana/@inputMode = '2ByteKatakana'"> <xsl:value-of select="$valFullWidthKatakana"/> </xsl:when> <xsl:when test="$inFurigana/@inputMode = '2ByteRoman'"> <xsl:value-of select="$valFullWidthRoman"/> </xsl:when> <xsl:when test="$inFurigana/@inputMode = '1ByteKatakana'"> <xsl:value-of select="$valHalfWidthKatakana"/> </xsl:when> <xsl:when test="$inFurigana/@inputMode = '1ByteRoman'"> <xsl:value-of select="$valHalfWidthRoman"/> </xsl:when> </xsl:choose> </li> </ul> </xsl:if> </xsl:template> <xsl:template name="IndexValue"> <xsl:param name="indexValue"/> <xsl:choose> <xsl:when test="$indexValue = 'None'"> <xsl:value-of select="$valNone"/> </xsl:when> <xsl:when test="$indexValue = 'Minimal'"> <xsl:value-of select="$valMinimal"/> </xsl:when> <xsl:when test="$indexValue ='All'"> <xsl:value-of select="$valAll"/> </xsl:when> </xsl:choose> </xsl:template> <!-- template to generate the table headings for the Table section --> <xsl:template name="TableHeadings-BaseTableCatalog"> <tr class="chartheaders" vAlign="top"> <td width="15%"> <xsl:value-of select="$valTableName"/> </td> <td width="29%"> <div align="left"> <xsl:value-of select="$valStatistics"/> </div> </td> <td width="29%"> <xsl:value-of select="$valGraphOccurrences"/> </td> </tr> </xsl:template> <!-- template to generate the table headings for the Field section --> <xsl:template name="TableHeadings-FieldCatalog"> <xsl:param name="inBaseTable"/> <tr class="privsetfirst" vAlign="top"> <td colSpan="9"> <xsl:value-of select="concat($valTableName, ': ')"/> <xsl:call-template name="BaseTableAnchor"> <xsl:with-param name="inBaseTable" select="$inBaseTable/@name"/> </xsl:call-template> <xsl:value-of select="concat(' - ',count($inBaseTable/FieldCatalog/Field), ' ', $valFields)"/> </td> </tr> <tr class="chartheaders" vAlign="top"> <td width="8%"> <xsl:value-of select="$valFieldName"/> </td> <td width="7%"> <xsl:value-of select="$valType"/> </td> <td width="14%"> <xsl:value-of select="$valOptions"/> </td> <td width="10%"> <xsl:value-of select="$valComments"/> </td> <td width="13%"> <xsl:value-of select="$valOnLayouts"/> </td> <td width="15%"> <xsl:value-of select="$valInRelationships"/> </td> <td width="22%"> <xsl:value-of select="$valInScripts"/> </td> <td width="11%"> <xsl:value-of select="$valInValueLists"/> </td> </tr> </xsl:template> <!-- Generate table information --> <xsl:template name="Table-BaseTable" match="BaseTableCatalog"> <p> <span class="partheading"> <xsl:call-template name="TableSectionAnchor"/> </span> </p> <table width="95%" border="1"> <tbody> <!-- Generate the table headings --> <xsl:call-template name="TableHeadings-BaseTableCatalog"/> <!-- Loop through and document all the table information --> <xsl:for-each select="BaseTable"> <!--SORTBYNAME removed for quicker parsing --> <!--<xsl:sort select="@name"/> --> <tr class="regularcharttext" vAlign="top"> <td> <xsl:call-template name="BaseTableReference"> <xsl:with-param name="inBaseTable" select="@name"/> </xsl:call-template> </td> <td> <div align="left"> <xsl:choose> <xsl:when test="count(FieldCatalog/Field) > 1"> <xsl:call-template name="Link-WithAnchor"> <xsl:with-param name="inAnchor" select="concat('#',@name, $kAnchorBaseTable)"/> <xsl:with-param name="inDisplayText" select="concat(count(FieldCatalog/Field), ' ', $valfields)"/> </xsl:call-template> </xsl:when> <xsl:when test="count(FieldCatalog/Field) = 0"> <xsl:value-of select="concat(count(FieldCatalog/Field), ' ', $valfields)"/> </xsl:when> <xsl:otherwise> <xsl:call-template name="Link-WithAnchor"> <xsl:with-param name="inAnchor" select="concat('#',@name, $kAnchorBaseTable)"/> <xsl:with-param name="inDisplayText" select="concat(count(FieldCatalog/Field), ' ', $valfield)"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> <xsl:value-of select="concat(' ', $valDefined, ', ', @records, ' ')"/> <xsl:choose> <xsl:when test="@records > 1"> <xsl:value-of select="$valrecords"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="$valrecord"/> </xsl:otherwise> </xsl:choose> </div> </td> <!--Table aliases --> <td> <xsl:call-template name="TableAliasList"> <xsl:with-param name="inBaseTable" select="@name"/> </xsl:call-template> </td> </tr> </xsl:for-each> </tbody> </table> <xsl:if test="BaseTable/FieldCatalog"> <p> <span class="partheading"> <xsl:call-template name="FieldSectionAnchor"/> </span> </p> </xsl:if> <!-- Loop again to generate the field information for the tables --> <xsl:for-each select="BaseTable"> <!--SORTBYNAME--> <!--<xsl:sort select="@name"/>--> <xsl:if test="generate-id(.) != generate-id(ancestor::BaseTableCatalog/BaseTable[1]) and FieldCatalog"> <br/> </xsl:if> <xsl:apply-templates/> </xsl:for-each> </xsl:template> <!-- Generate a table of field information stuff only right now --> <xsl:template name="Table-FieldCatalog" match="FieldCatalog"> <table width="100%" border="1"> <tbody> <!--Generate the table headings --> <xsl:call-template name="TableHeadings-FieldCatalog"> <xsl:with-param name="inBaseTable" select="ancestor::BaseTable"/> </xsl:call-template> <!--Process each Field child node. --> <xsl:apply-templates/> </tbody> </table> </xsl:template> <xsl:template name="Table-FieldCalc"> <xsl:param name="inFieldCalc"/> <xsl:if test="$inFieldCalc"> <strong><xsl:value-of select="concat($valCalculation,':')"/></strong> <ul> <li> <xsl:call-template name="GenerateCalc"> <xsl:with-param name="inDisplayCalc" select="$inFieldCalc"/> </xsl:call-template> </li> </ul> </xsl:if> </xsl:template> <xsl:template name="Table-SummaryInfo"> <xsl:param name="inSummaryInfo"/> <xsl:if test="$inSummaryInfo"> <strong><xsl:value-of select="concat($valSummaryInfo,':')"/></strong> <ul> <li> <xsl:choose> <xsl:when test="$inSummaryInfo/@operation = 'Total'"> <xsl:value-of select="$valTotal"/> </xsl:when> <xsl:when test="$inSummaryInfo/@operation = 'RunningTotal'"> <xsl:value-of select="$valRunningTotal"/> </xsl:when> <xsl:when test="$inSummaryInfo/@operation = 'Average'"> <xsl:value-of select="$valAverage"/> </xsl:when> <xsl:when test="$inSummaryInfo/@operation = 'WeightedAverage'"> <xsl:value-of select="$valWeightedAverage"/> </xsl:when> <xsl:when test="$inSummaryInfo/@operation = 'Count'"> <xsl:value-of select="$valCount"/> </xsl:when> <xsl:when test="$inSummaryInfo/@operation = 'RunningCount'"> <xsl:value-of select="$valRunningCount"/> </xsl:when> <xsl:when test="$inSummaryInfo/@operation = 'Minimum'"> <xsl:value-of select="$valMinimum"/> </xsl:when> <xsl:when test="$inSummaryInfo/@operation = 'Maximum'"> <xsl:value-of select="$valMaximum"/> </xsl:when> <xsl:when test="$inSummaryInfo/@operation = 'StdDeviation'"> <xsl:value-of select="$valStdDeviation"/> </xsl:when> <xsl:when test="$inSummaryInfo/@operation = 'StdDeviationByPopulation'"> <xsl:value-of select="$valStdDeviationByPopulation"/> </xsl:when> <xsl:when test="$inSummaryInfo/@operation = 'Fractional'"> <xsl:value-of select="$valFractional"/> </xsl:when> <xsl:when test="$inSummaryInfo/@operation = 'FractionalSubtotal'"> <xsl:value-of select="$valFractionalSubtotal"/> </xsl:when> </xsl:choose> </li> <li> <xsl:choose> <xsl:when test="$inSummaryInfo/@summarizeRepetition = 'Together'"> <xsl:value-of select="$valTogether"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="$valIndividually"/> </xsl:otherwise> </xsl:choose> </li> <li> <xsl:value-of select="concat($valSummaryField,': ')"/> <xsl:call-template name="Link-WithAnchor"> <xsl:with-param name="inAnchor" select="concat('#', ancestor::BaseTable/@name, $inSummaryInfo/SummaryField/Field/@name, $kAnchorField)"/> <xsl:with-param name="inDisplayText" select="$inSummaryInfo/SummaryField/Field/@name"/> </xsl:call-template> <xsl:if test="$inSummaryInfo/AdditionalField"> <xsl:value-of select="concat(', ',$valAdditionalField,': ')"/> <xsl:choose> <xsl:when test="$inSummaryInfo/AdditionalField/Field/@table"> <xsl:call-template name="FieldReference-ShowTableAlias"> <xsl:with-param name="inField" select="$inSummaryInfo/AdditionalField/Field"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:call-template name="Link-WithAnchor"> <xsl:with-param name="inAnchor" select="concat('#', ancestor::BaseTable/@name, $inSummaryInfo/AdditionalField/Field/@name, $kAnchorField)"/> <xsl:with-param name="inDisplayText" select="$inSummaryInfo/AdditionalField/Field/@name"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:if> </li> </ul> </xsl:if> </xsl:template> <!-- Generate a field information --> <xsl:template name="Table-Field" match="FieldCatalog/Field"> <tr class="regularcharttext" vAlign="top"> <td> <xsl:call-template name="FieldAnchor"> <xsl:with-param name="inField" select="@name"/> <xsl:with-param name="inBaseTable" select="ancestor::BaseTable/@name"/> </xsl:call-template> </td> <td> <xsl:call-template name="FieldType"> <xsl:with-param name="inFieldType" select="@fieldType"/> </xsl:call-template> <xsl:text>, </xsl:text> <xsl:call-template name="DataType"> <xsl:with-param name="inDataType" select="@dataType"/> </xsl:call-template> <!--<xsl:if test="@alwaysEvaluate = 'True'"> <xsl:text>, </xsl:text> <xsl:value-of select="$valAlwaysEvaluate"/> </xsl:if>--> </td> <td> <!--Field calcs --> <xsl:call-template name="Table-FieldCalc"> <xsl:with-param name="inFieldCalc" select="DisplayCalculation"/> </xsl:call-template> <!--Summary--> <xsl:call-template name="Table-SummaryInfo"> <xsl:with-param name="inSummaryInfo" select="SummaryInfo"/> </xsl:call-template> <!-- Auto-enter information. --> <xsl:call-template name="Table-AutoEnter"> <xsl:with-param name="inAutoEnter" select="AutoEnter"/> </xsl:call-template> <!-- Validation informaiton --> <xsl:call-template name="Table-Validation"> <xsl:with-param name="inValidation" select="Validation"/> </xsl:call-template> <!-- Storage information --> <xsl:call-template name="Table-Storage"> <xsl:with-param name="inStorage" select="Storage"/> </xsl:call-template> <!--Furigana--> <xsl:call-template name="Table-Furigana"> <xsl:with-param name="inFurigana" select="Furigana"/> </xsl:call-template> </td> <!-- Field Comments --> <td> <xsl:value-of select="Comment"/> </td> <!-- Generate the layout references for the fields --> <xsl:variable name="varBaseTable" select="ancestor::BaseTable/@name"/> <xsl:variable name="varFieldName" select="@name"/> <td> <ul> <xsl:variable name="layoutList" select="/FMPReport/File/LayoutCatalog/Layout[*/*//Field[@name = $varFieldName and key('BaseTable-TableAliasIndex',@table)[@baseTable = $varBaseTable and not(FileReference)]]]"/> <xsl:for-each select="$layoutList"> <!--SORTBYNAME--> <!--<xsl:sort select="@name"/>--> <li> <xsl:call-template name="LayoutReference"> <xsl:with-param name="inLayout" select="."/> </xsl:call-template> </li> </xsl:for-each> </ul> </td> <!-- Relationship References --> <td> <xsl:variable name="varRelationshipList" select="/FMPReport/File/RelationshipGraph/RelationshipList/Relationship[JoinPredicateList/JoinPredicate//Field[(@name = $varFieldName) and (key('BaseTable-TableAliasIndex', @table)/@baseTable = $varBaseTable)]]"/> <ul> <xsl:for-each select="$varRelationshipList"> <li> <xsl:call-template name="RelationshipReference"> <xsl:with-param name="inRelationship" select="."/> </xsl:call-template> </li> </xsl:for-each> </ul> </td> <!-- Script references --> <td> <ul> <xsl:for-each select="/FMPReport/File/ScriptCatalog/Script[*/*//Field[@name = $varFieldName and key('BaseTable-TableAliasIndex',@table)[@baseTable = $varBaseTable and not(FileReference)]]]"> <!--SORTBYNAME--> <!--<xsl:sort select="@name"/>--> <li> <xsl:call-template name="ScriptReference"> <xsl:with-param name="inScript" select="."/> </xsl:call-template> </li> </xsl:for-each> </ul> </td> <!-- Generate the value list references for fields --> <td> <ul> <xsl:for-each select="/FMPReport/File/ValueListCatalog/ValueList[*/Field[@name = $varFieldName and key('BaseTable-TableAliasIndex',@table)[@baseTable = $varBaseTable and not(FileReference)]]]"> <!--SORTBYNAME--> <!--<xsl:sort select="@name"/>--> <li> <xsl:call-template name="VLReference"> <xsl:with-param name="inVL" select="."/> </xsl:call-template> </li> </xsl:for-each> </ul> </td> </tr> </xsl:template> <!-- Generate a table layout information stuff only right now --> <xsl:template name="Table-LayoutCatalog" match="LayoutCatalog"> <p> <span class="partheading"> <xsl:call-template name="AnchorPoint"> <xsl:with-param name="inAnchor" select="concat($valLayouts, $kAnchorSection)"/> <xsl:with-param name="inDisplayText" select="$valLayouts"/> </xsl:call-template> </span> </p> <table width="95%" border="1"> <tbody> <tr class="chartheaders" vAlign="top"> <td width="12%"> <xsl:value-of select="$valLayoutName"/> </td> <td width="12%"> <xsl:value-of select="$valShowRecordsFrom"/> </td> <td width="12%"> <xsl:value-of select="$valSaveRecordChanges"/> </td> <td width="18%"> <xsl:value-of select="$valShowFieldFrames"/> </td> <td width="15%"> <xsl:value-of select="$valContainsFields"/> </td> <td width="25%"> <xsl:value-of select="$valContainsButtons"/> </td> <td width="25%"> <xsl:value-of select="$valUsedInScripts"/> </td> </tr> <xsl:apply-templates/> </tbody> </table> </xsl:template> <xsl:template name="Bit"> <xsl:param name="inVal"/> <xsl:param name="inBit"/> <xsl:choose> <xsl:when test="(($inVal mod ($inBit*2)) - ($inVal mod ($inBit))) > 0"> <xsl:value-of select="'true'"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="'false'"/> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="FieldFormatType"> <xsl:param name="inDisplayType"/> <xsl:choose> <xsl:when test="$inDisplayType='0'"> <xsl:value-of select="$valEditBox"/> </xsl:when> <xsl:when test="$inDisplayType='1'"> <xsl:value-of select="$valPopupList"/> </xsl:when> <xsl:when test="$inDisplayType='2'"> <xsl:value-of select="$valPopupMenu"/> </xsl:when> <xsl:when test="$inDisplayType='3'"> <xsl:value-of select="$valCheckboxSet"/> </xsl:when> <xsl:when test="$inDisplayType='4'"> <xsl:value-of select="$valRadioButtonSet"/> </xsl:when> </xsl:choose> </xsl:template> <xsl:template name="FieldFormatFlag"> <xsl:param name="inText"/> <xsl:param name="inVal"/> <xsl:param name="inBit"/> <xsl:variable name="bitResult"> <xsl:call-template name="Bit"> <xsl:with-param name="inVal" select="$inVal"/> <xsl:with-param name="inBit" select="$inBit"/> </xsl:call-template> </xsl:variable> <xsl:if test="$bitResult = 'true'"> <xsl:value-of select="$inText"/> </xsl:if> </xsl:template> <xsl:template name="FieldFormatShowRep"> <xsl:param name="inFieldObject"/> <xsl:value-of select="concat($valShowRepetition,': ')"/> <xsl:value-of select="concat($inFieldObject/DDRInfo/Field/@repetition,' ',$valThrough,' ')"/> <xsl:variable name="numOfReps"> <xsl:choose> <xsl:when test="$inFieldObject/@numOfReps < 0"> <xsl:value-of select="-($inFieldObject/@numOfReps)"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="$inFieldObject/@numOfReps"/> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:value-of select="$inFieldObject/DDRInfo/Field/@repetition + $numOfReps - 1"/> </xsl:template> <xsl:template name="FieldFormatOrientation"> <xsl:param name="inFieldObject"/> <xsl:variable name="orientation"> <xsl:choose> <xsl:when test="$inFieldObject/@numOfReps < 0"> <xsl:value-of select="$valHorizontal"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="$valVertical"/> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:value-of select="concat($valOrientation, ': ',$orientation)"/> </xsl:template> <xsl:template name="FieldFormat"> <xsl:param name="inObject"/> <!--Bit values --> <xsl:variable name="bitVScrollBar" select="256"/> <xsl:variable name="bitIncludeOther" select="1"/> <xsl:variable name="bitIncludeEdit" select="8"/> <xsl:value-of select="concat($valFieldFormat,': ')"/> <ul> <li> <xsl:call-template name="FieldFormatType"> <xsl:with-param name="inDisplayType" select="$inObject/@displayType"/> </xsl:call-template> </li> <xsl:variable name="valueList" select="$inObject/DDRInfo/ValueList"/> <xsl:if test="$valueList"> <li> <xsl:value-of select="concat($valDisplayValFrom, ': ')"/> <xsl:call-template name="VLReference"> <xsl:with-param name="inVL" select="$valueList"/> </xsl:call-template> </li> </xsl:if> <!--Vertical Scroll bar. --> <xsl:variable name="includeVScroll"> <xsl:call-template name="Bit"> <xsl:with-param name="inVal" select="$inObject/@flags"/> <xsl:with-param name="inBit" select="$bitVScrollBar"/> </xsl:call-template> </xsl:variable> <xsl:if test="$includeVScroll = 'true'"> <li> <xsl:value-of select="$valIncludeVScrollBar"/> </li> </xsl:if> <!--Include Other..."--> <xsl:variable name="includeOther"> <xsl:call-template name="Bit"> <xsl:with-param name="inVal" select="$inObject/@flags"/> <xsl:with-param name="inBit" select="$bitIncludeOther"/> </xsl:call-template> </xsl:variable> <xsl:if test="$includeOther='true'"> <li> <xsl:value-of select="$valIncludeOther"/> </li> </xsl:if> <!--Include Edit..."--> <xsl:variable name="includeEdit"> <xsl:call-template name="Bit"> <xsl:with-param name="inVal" select="$inObject/@flags"/> <xsl:with-param name="inBit" select="$bitIncludeEdit"/> </xsl:call-template> </xsl:variable> <xsl:if test="$includeEdit='true'"> <li> <xsl:value-of select="$valIncludeEdit"/> </li> </xsl:if> <!--Repetition--> <xsl:if test="$inObject/DDRInfo/Field/@maxRepetition > '1'"> <li> <xsl:call-template name="FieldFormatShowRep"> <xsl:with-param name="inFieldObject" select="$inObject"/> </xsl:call-template> </li> <!--Orientation--> <li> <xsl:call-template name="FieldFormatOrientation"> <xsl:with-param name="inFieldObject" select="$inObject"/> </xsl:call-template> </li> </xsl:if> </ul> </xsl:template> <xsl:template name="FieldBehaviorInputMode"> <xsl:param name="inVal"/> <xsl:choose> <xsl:when test="$inVal='128'"> <xsl:value-of select="$valSynchFieldFont"/> </xsl:when> <xsl:when test="$inVal='129'"> <xsl:value-of select="$valJapActive"/> </xsl:when> <xsl:when test="$inVal='130'"> <xsl:value-of select="$valJapDirect"/> </xsl:when> <xsl:when test="$inVal='131'"> <xsl:value-of select="$valHiragana"/> </xsl:when> <xsl:when test="$inVal='132'"> <xsl:value-of select="$valFullWidthKatakana"/> </xsl:when> <xsl:when test="$inVal='133'"> <xsl:value-of select="$valFullWidthAlpha"/> </xsl:when> <xsl:when test="$inVal='134'"> <xsl:value-of select="$valHalfWidthKatakana"/> </xsl:when> <xsl:when test="$inVal='135'"> <xsl:value-of select="$valHalfWidthAlpha"/> </xsl:when> </xsl:choose> </xsl:template> <xsl:template name="FieldBehavior"> <xsl:param name="inObject"/> <xsl:variable name="bitNoFindModeEntry" select="16"/> <xsl:variable name="bitNoBrowseModeEntry" select="4"/> <xsl:variable name="bitSelectEntireContents" select="2"/> <xsl:variable name="bitTab" select="32"/> <xsl:variable name="bitReturn" select="64"/> <xsl:variable name="bitEnter" select="128"/> <xsl:variable name="findMode"> <xsl:call-template name="Bit"> <xsl:with-param name="inVal" select="$inObject/@flags"/> <xsl:with-param name="inBit" select="$bitNoFindModeEntry"/> </xsl:call-template> </xsl:variable> <xsl:variable name="browseMode"> <xsl:call-template name="Bit"> <xsl:with-param name="inVal" select="$inObject/@flags"/> <xsl:with-param name="inBit" select="$bitNoBrowseModeEntry"/> </xsl:call-template> </xsl:variable> <xsl:variable name="selectEntireContents"> <xsl:call-template name="Bit"> <xsl:with-param name="inVal" select="$inObject/@flags"/> <xsl:with-param name="inBit" select="$bitSelectEntireContents"/> </xsl:call-template> </xsl:variable> <xsl:variable name="useTab"> <xsl:call-template name="Bit"> <xsl:with-param name="inVal" select="$inObject/@flags"/> <xsl:with-param name="inBit" select="$bitTab"/> </xsl:call-template> </xsl:variable> <xsl:variable name="useReturn"> <xsl:call-template name="Bit"> <xsl:with-param name="inVal" select="$inObject/@flags"/> <xsl:with-param name="inBit" select="$bitReturn"/> </xsl:call-template> </xsl:variable> <xsl:variable name="useEnter"> <xsl:call-template name="Bit"> <xsl:with-param name="inVal" select="$inObject/@flags"/> <xsl:with-param name="inBit" select="$bitEnter"/> </xsl:call-template> </xsl:variable> <xsl:if test="($findMode = 'false') or ($browseMode = 'false') or ($selectEntireContents = 'true') or ($useTab = 'true') or ($useReturn = 'true') or ($useEnter = 'true')"> <xsl:value-of select="concat($valFieldBehavior,':')"/> <ul> <xsl:variable name="allowFieldEnter"> <xsl:if test="$findMode = 'false'"> <xsl:value-of select="$valInFindMode"/> </xsl:if> <xsl:if test="$browseMode = 'false'"> <xsl:choose> <xsl:when test="$findMode = 'false'"> <xsl:value-of select="concat(', ',$valInBrowseMode)"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="$valInBrowseMode"/> </xsl:otherwise> </xsl:choose> </xsl:if> </xsl:variable> <xsl:if test="string-length($allowFieldEnter) > 0"> <li> <xsl:value-of select="concat($valAllowFieldEnter,': ',$allowFieldEnter)"/> </li> </xsl:if> <!--Select entire contents--> <xsl:if test="$selectEntireContents='true'"> <li> <xsl:value-of select="$valSelectEntireContents"/> </li> </xsl:if> <!--Input mode--> <xsl:if test="($inObject/@inputMode < '136' and $inObject/@inputMode > '127')"> <li> <xsl:value-of select="concat($valSetInputMethod,': ')"/> <xsl:call-template name="FieldBehaviorInputMode"> <xsl:with-param name="inVal" select="$inObject/@inputMode"/> </xsl:call-template> </li> </xsl:if> <!--Go to next field--> <xsl:variable name="goToNextField"> <xsl:if test="$useTab='true'"> <xsl:value-of select="$valTabKey"/> </xsl:if> <xsl:if test="$useReturn ='true'"> <xsl:if test="$useTab='true'"> <xsl:value-of select="', '"/> </xsl:if> <xsl:value-of select="$valReturnKey"/> </xsl:if> <xsl:if test="$useEnter ='true'"> <xsl:if test="$useReturn='true' or $useTab='true'"> <xsl:value-of select="', '"/> </xsl:if> <xsl:value-of select="$valEnterKey"/> </xsl:if> </xsl:variable> <xsl:if test="$useTab = 'true' or $useReturn = 'true' or $useEnter = 'true'"> <li> <xsl:value-of select="concat($valGoToNextField,': ', $goToNextField)"/> </li> </xsl:if> </ul> </xsl:if> </xsl:template> <!--Generate a layout information --> <xsl:template name="Table-Layout" match="LayoutCatalog/Layout"> <tr class="regularcharttext" vAlign="top"> <td> <xsl:call-template name="LayoutAnchor"> <xsl:with-param name="inLayout" select="."/> </xsl:call-template> </td> <td> <xsl:call-template name="TableAliasReference"> <xsl:with-param name="inTableAlias" select="Table"/> </xsl:call-template> </td> <td> <xsl:call-template name="GetState"> <xsl:with-param name="inValue" select="Options/@saveRecord"/> </xsl:call-template> </td> <td> <xsl:call-template name="GetState"> <xsl:with-param name="inValue" select="Options/@showFieldFrames"/> </xsl:call-template> </td> <!-- Fields on a layout --> <td> <ul> <xsl:variable name="fieldList" select="*//FieldObj"/> <xsl:for-each select="$fieldList"> <!--SORTBYNAME--> <!--<xsl:sort select="@name"/>--> <!--<xsl:variable name="currentField" select="."/> <xsl:variable name="sameFieldList" select="$fieldList[(@name = $currentField/@name) and (key('BaseTable-TableAliasIndex', @table)/@baseTable = key('BaseTable-TableAliasIndex', $currentField/@table)/@baseTable) and (string(key('BaseTable-TableAliasIndex', @table)/FileReference/@name) = string(key('BaseTable-TableAliasIndex', $currentField/@table)/FileReference/@name))]"/> <xsl:if test="generate-id($currentField) = generate-id($sameFieldList[1])"> <li> <xsl:call-template name="FieldReference-ShowTableAlias"> <xsl:with-param name="inField" select="$sameFieldList[1]"/> </xsl:call-template> </li> </xsl:if> --> <li> <xsl:call-template name="FieldReference-ShowTableAlias"> <xsl:with-param name="inField" select="DDRInfo/Field"/> </xsl:call-template> <br/> <xsl:call-template name="FieldFormat"> <xsl:with-param name="inObject" select="."/> </xsl:call-template> <br/> <xsl:call-template name="FieldBehavior"> <xsl:with-param name="inObject" select="."/> </xsl:call-template> </li> </xsl:for-each> </ul> </td> <!--Buttons--> <td> <ul> <xsl:variable name="buttonList" select=".//Object[@type = 'GroupButton']"/> <xsl:for-each select="$buttonList"> <xsl:if test="GroupButtonObj/Step"> <li> <xsl:call-template name="ButtonInfo"> <xsl:with-param name="inButton" select="."/> </xsl:call-template> </li> </xsl:if> </xsl:for-each> </ul> </td> <!--Script references for layout--> <td> <ul> <xsl:variable name="layoutName" select="@name"/> <xsl:variable name="layoutID" select="@id"/> <xsl:variable name="scriptList" select="/FMPReport/File/ScriptCatalog/Script[StepList/Step/Layout[@name = $layoutName and @id = $layoutID]]"/> <xsl:for-each select="$scriptList"> <li> <xsl:call-template name="ScriptReference"> <xsl:with-param name="inScript" select="."/> </xsl:call-template> </li> </xsl:for-each> </ul> </td> </tr> </xsl:template> <xsl:template name="ButtonInfo"> <xsl:param name="inButton"/> <xsl:call-template name="ButtonName"> <xsl:with-param name="inButton" select="$inButton"/> </xsl:call-template> <xsl:text>--></xsl:text> <xsl:value-of select="$inButton/GroupButtonObj/Step/StepText"/> </xsl:template> <xsl:template name="ButtonName"> <xsl:param name="inButton"/> <xsl:choose> <xsl:when test="$inButton/GroupButtonObj/@numOfObjs > 3"> <xsl:value-of select="$valGroupButton"/> </xsl:when> <xsl:when test="$inButton/GroupButtonObj/@numOfObjs = 3"> <xsl:choose> <xsl:when test="$inButton/GroupButtonObj/Object/@type = 'Text'"> <xsl:value-of select="$inButton/GroupButtonObj/Object/TextObj/CharacterStyleVector/Style/Data"/> </xsl:when> <xsl:when test="$inButton/GroupButtonObj/Object/@type = 'Field'"> <xsl:call-template name="FieldReference-ShowTableAlias"> <xsl:with-param name="inField" select="$inButton/GroupButtonObj/Object/FieldObj/DDRInfo/Field"/> </xsl:call-template> </xsl:when> <xsl:when test="$inButton/GroupButtonObj/Object/@type = 'Rect'"> <xsl:value-of select="$valRect"/> </xsl:when> <xsl:when test="$inButton/GroupButtonObj/Object/@type = 'RRect'"> <xsl:value-of select="$valRRect"/> </xsl:when> <xsl:when test="$inButton/GroupButtonObj/Object/@type = 'Portal'"> <xsl:value-of select="$valPortal"/> </xsl:when> <xsl:when test="$inButton/GroupButtonObj/Object/@type = 'Line'"> <xsl:value-of select="$valLine"/> </xsl:when> <xsl:when test="$inButton/GroupButtonObj/Object/@type = 'Oval'"> <xsl:value-of select="$valOval"/> </xsl:when> </xsl:choose> </xsl:when> </xsl:choose> </xsl:template> <!--<xsl:template name="ButtonBoundary"> <xsl:param name="inButton"/> </xsl:template>--> <!-- Generate Relaionships --> <xsl:template name="TableHeadings-TableOcurrences"> <tr class="chartheaders" vAlign="top"> <td width="9%"><xsl:value-of select="$valTableOccurrence"/></td> <td width="13%"><xsl:value-of select="$valSourceTable"/></td> <td width="11%"><xsl:value-of select="$valSourceFile"/></td> <td width="16%"><xsl:value-of select="$valInRelationships"/></td> <td width="12%"><xsl:value-of select="$valInScripts"/></td> <td width="16%"><xsl:value-of select="$valInFieldDefinitions"/></td> <td width="13%"><xsl:value-of select="$valInValueLists"/></td> <td width="10%"><xsl:value-of select="$valAssociatedLayouts"/></td> </tr> </xsl:template> <xsl:template name="Tables-Relationship" match="RelationshipGraph"> <xsl:apply-templates/> </xsl:template> <!-- Get table alias. If it represents an external table, make it a reference. Otherwise, make it an anchor. --> <xsl:template name="GetTableAlias"> <xsl:param name="inTableAlias"/> <xsl:choose> <!-- External table occurrence, make a reference! --> <xsl:when test="$inTableAlias/FileReference"> <xsl:call-template name="TableAliasReference"> <xsl:with-param name="inTableAlias" select="$inTableAlias"/> </xsl:call-template> </xsl:when> <!-- Internal table occurrence, make an anchor! --> <xsl:otherwise> <xsl:call-template name="TableAliasAnchor"> <xsl:with-param name="inTableAlias" select="$inTableAlias"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="Table-TableOccurrences" match="TableList"> <p> <span class="partheading"> <xsl:call-template name="AnchorPoint"> <xsl:with-param name="inAnchor" select="concat($valRelationships, $kAnchorSection)"/> <xsl:with-param name="inDisplayText" select="concat($valRelationships,': ', $valTableOccurrences)"/> </xsl:call-template> </span> </p> <table width="100%" border="1"> <xsl:call-template name="TableHeadings-TableOcurrences"/> <xsl:for-each select="Table"> <!--SORTBYNAME--> <!--<xsl:sort select="@name"/>--> <tr class="regularcharttext" vAlign="top"> <!--Table Occurrence--> <td bgColor="{@color}"> <xsl:call-template name="GetTableAlias"> <xsl:with-param name="inTableAlias" select="."/> </xsl:call-template> </td> <!-- Source Tables --> <td> <xsl:call-template name="BaseTableRefGivenTableAlias"> <xsl:with-param name="inTableAlias" select="."/> </xsl:call-template> </td> <!-- Source File --> <td> <xsl:call-template name="GetSourceFileGivenTableAlias"> <xsl:with-param name="inTableAlias" select ="."/> </xsl:call-template> </td> <!--Relationship reference --> <td> <xsl:variable name="relationshipsWithTable" select="key('Relationship-LeftTableAliasIndex', @name) | key('Relationship-RightTableAliasIndex', @name)"/> <ul> <xsl:for-each select="$relationshipsWithTable"> <li> <xsl:call-template name="RelationshipReference"> <xsl:with-param name="inRelationship" select="."/> </xsl:call-template> </li> </xsl:for-each> </ul> </td> <!--Script reference --> <xsl:variable name="varTableName" select="@name"/> <td> <xsl:variable name="scriptRefList" select="/FMPReport/File/ScriptCatalog/Script[*/*//Field/@table = $varTableName]"/> <ul> <xsl:for-each select="$scriptRefList"> <!--SORTBYNAME--> <!--<xsl:sort select="@name"/>--> <li> <xsl:call-template name="ScriptReference"> <xsl:with-param name="inScript" select="."/> </xsl:call-template> </li> </xsl:for-each> </ul> </td> <!--Field Defintion references--> <td> <xsl:variable name="fieldRefList" select="/FMPReport/File/BaseTableCatalog/BaseTable/FieldCatalog/Field[*//Field/@table = $varTableName]"/> <ul> <xsl:for-each select="$fieldRefList"> <!--SORTBYNAME--> <!--<xsl:sort select="@name"/>--> <li> <xsl:call-template name="FieldDefinitionReference"> <xsl:with-param name="inFieldDefinition" select="."/> </xsl:call-template> </li> </xsl:for-each> </ul> </td> <!-- ValueList References --> <td> <xsl:variable name="tableName" select="@name"/> <xsl:variable name="VL-List" select="/FMPReport/File/ValueListCatalog/ValueList[*/Field[@table = $tableName]]"/> <ul> <xsl:for-each select="$VL-List"> <!--SORTBYNAME--> <!--<xsl:sort select="@name"/>--> <li> <xsl:call-template name="VLReference"> <xsl:with-param name="inVL" select="."/> </xsl:call-template> </li> </xsl:for-each> </ul> </td> <!-- Layout Reference--> <td> <xsl:variable name="tableOccurrenceName" select="@name"/> <xsl:variable name="layoutList" select="/FMPReport/File/LayoutCatalog/Layout[*/*//Field[@table = $tableOccurrenceName]]"/> <ul> <xsl:for-each select="$layoutList"> <!--SORTBYNAME--> <!--<xsl:sort select="@name"/>--> <li> <xsl:call-template name="LayoutReference"> <xsl:with-param name="inLayout" select="."/> </xsl:call-template> </li> </xsl:for-each> </ul> </td> </tr> </xsl:for-each> </table> </xsl:template> <xsl:template name="Table-RelationshipDetails" match="RelationshipList"> <p> <span class="partheading"> <xsl:call-template name="AnchorPoint"> <xsl:with-param name="inAnchor" select="concat($valDetails, $kAnchorSection)"/> <xsl:with-param name="inDisplayText" select="concat($valRelationships,': ', $valDetails)"/> </xsl:call-template> </span> </p> <xsl:for-each select="Relationship"> <p> <span class="partheading"> <xsl:value-of select="concat($valRelationship,': ')"/> <xsl:call-template name="RelationshipAnchor"> <xsl:with-param name="inRelationship" select="."/> </xsl:call-template> </span> </p> <xsl:variable name="leftTableName" select="LeftTable/@name"/> <xsl:variable name="rightTableName" select="RightTable/@name"/> <table width="100%" border="1"> <tbody> <tr vAlign="top"> <td class="chartheadersnobg" width="18%"><xsl:value-of select="$valTableOccurrence"/></td> <td class="regularcharttext" bgColor="{key('BaseTable-TableAliasIndex',$leftTableName)/@color}"> <xsl:call-template name="TableAliasReferenceGivenName"> <xsl:with-param name="inTableAliasName" select="$leftTableName"/> </xsl:call-template> </td> <td class="regularcharttext"></td> <td class="regularcharttext" bgColor="{key('BaseTable-TableAliasIndex',$rightTableName)/@color}"> <xsl:call-template name="TableAliasReferenceGivenName"> <xsl:with-param name="inTableAliasName" select="$rightTableName"/> </xsl:call-template> </td> </tr> <!--Now report the join predicates of the relationship!--> <xsl:for-each select="JoinPredicateList/JoinPredicate"> <tr vAlign="top"> <xsl:choose> <xsl:when test="generate-id(.) = generate-id(ancestor::JoinPredicateList/JoinPredicate[1])"> <td class="chartheadersnobg"> <xsl:value-of select="$valField"/> </td> </xsl:when> <xsl:otherwise> <td class="chartheadersnobg" align="right"> <xsl:value-of select="$valAnd"/> </td> </xsl:otherwise> </xsl:choose> <td class="regularcharttext"> <xsl:call-template name="FieldReference-ShowFieldNameOnly"> <xsl:with-param name="inField" select="LeftField/Field"/> </xsl:call-template> </td> <td class="regularcharttext" align="middle"> <xsl:call-template name="JoinPredicateType"> <xsl:with-param name="inJoinPredicate" select="."/> </xsl:call-template> </td> <td class="regularcharttext"> <xsl:call-template name="FieldReference-ShowFieldNameOnly"> <xsl:with-param name="inField" select="RightField/Field"/> </xsl:call-template> </td> </tr> </xsl:for-each> <!--Source Table --> <xsl:variable name="leftTableAlias" select="/FMPReport/File/RelationshipGraph/TableList/Table[@name = $leftTableName]"/> <xsl:variable name="rightTableAlias" select="/FMPReport/File/RelationshipGraph/TableList/Table[@name = $rightTableName]"/> <tr vAlign="top"> <td class="chartheadersnobg"> <xsl:value-of select="$valSourceTable"/> </td> <td class="regularcharttext"> <xsl:call-template name="BaseTableRefGivenTableAlias"> <xsl:with-param name="inTableAlias" select="$leftTableAlias"/> </xsl:call-template> </td> <td class="regularcharttext"> </td> <td class="regularcharttext"> <xsl:call-template name="BaseTableRefGivenTableAlias"> <xsl:with-param name="inTableAlias" select="$rightTableAlias"/> </xsl:call-template> </td> </tr> <!--Source File --> <tr vAlign="top"> <td class="chartheadersnobg"> <xsl:value-of select="$valSourceFile"/> </td> <td class="regularcharttext"> <xsl:call-template name="GetSourceFileGivenTableAlias"> <xsl:with-param name="inTableAlias" select="$leftTableAlias"/> </xsl:call-template> </td> <td class="regularcharttext"> </td> <td class="regularcharttext"> <xsl:call-template name="GetSourceFileGivenTableAlias"> <xsl:with-param name="inTableAlias" select="$rightTableAlias"/> </xsl:call-template> </td> </tr> <!--Cascade create--> <tr vAlign="top"> <td class="chartheadersnobg"> <xsl:value-of select="$valAllowCreationRelatedRecords"/> </td> <td class="regularcharttext"> <xsl:call-template name="GetState"> <xsl:with-param name="inValue" select="LeftTable/@cascadeCreate"/> </xsl:call-template> </td> <td class="regularcharttext"> </td> <td class="regularcharttext"> <xsl:call-template name="GetState"> <xsl:with-param name="inValue" select="RightTable/@cascadeCreate"/> </xsl:call-template> </td> </tr> <!--Cascade Delete--> <tr vAlign="top"> <td class="chartheadersnobg"> <xsl:value-of select="$valAllowDeleteRelatedRecords"/> </td> <td class="regularcharttext"> <xsl:call-template name="GetState"> <xsl:with-param name="inValue" select="LeftTable/@cascadeDelete"/> </xsl:call-template> </td> <td class="regularcharttext"> </td> <td class="regularcharttext"> <xsl:call-template name="GetState"> <xsl:with-param name="inValue" select="RightTable/@cascadeDelete"/> </xsl:call-template> </td> </tr> <tr vAlign="top"> <td class="chartheadersnobg"> <xsl:value-of select="$valSortRecords"/> </td> <td class="regularcharttext"> <xsl:choose> <xsl:when test="LeftTable/SortList"> <p><xsl:value-of select="$valOn"/></p> <xsl:for-each select="LeftTable/SortList/Sort"> <xsl:call-template name="Sort"> <xsl:with-param name="inSort" select="."/> </xsl:call-template> </xsl:for-each> </xsl:when> <xsl:otherwise> <p><xsl:value-of select="$valOff"/></p> </xsl:otherwise> </xsl:choose> </td> <td class="regularcharttext"> </td> <td class="regularcharttext"> <xsl:choose> <xsl:when test="RightTable/SortList"> <xsl:value-of select="$valOn"/> <xsl:for-each select="RightTable/SortList/Sort"> <xsl:call-template name="Sort"> <xsl:with-param name="inSort" select="."/> </xsl:call-template> </xsl:for-each> </xsl:when> <xsl:otherwise> <xsl:value-of select="$valOff"/> </xsl:otherwise> </xsl:choose> </td> </tr> </tbody> </table> </xsl:for-each> </xsl:template> <xsl:template name="Sort"> <xsl:param name="inSort"/> <xsl:if test="$inSort/PrimaryField"> <p> <xsl:value-of select="concat($valField,': ')"/> <xsl:call-template name="FieldReference-ShowFieldNameOnly"> <xsl:with-param name="inField" select="$inSort/PrimaryField/Field"/> </xsl:call-template> </p> <ul> <li> <xsl:call-template name="SortType"> <xsl:with-param name="inSort" select="$inSort"/> </xsl:call-template> <xsl:if test="$inSort/@type = 'Custom'"> <xsl:text>: </xsl:text> <xsl:call-template name="VLReference"> <xsl:with-param name="inVL" select="$inSort/ValueList"/> </xsl:call-template> </xsl:if> </li> <li> <xsl:value-of select="concat($valReoderSummaryField,': ')"/> <xsl:choose> <xsl:when test="$inSort/SummaryField"> <xsl:call-template name="FieldReference-ShowFieldNameOnly"> <xsl:with-param name="inField" select="$inSort/SummaryField/Field"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select="$valOff"/> </xsl:otherwise> </xsl:choose> </li> <li> <xsl:choose> <xsl:when test="$inSort/OverrideLanguage"> <xsl:value-of select="concat($valOverrideFieldLang,': ',$inSort/OverrideLanguage/@language)"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="concat($valOverrideFieldLang,': ',$valOff)"/> </xsl:otherwise> </xsl:choose> </li> </ul> </xsl:if> </xsl:template> <xsl:template name="SortType"> <xsl:param name="inSort"/> <xsl:choose> <xsl:when test="$inSort/@type = 'Ascending'"> <xsl:value-of select="$valAscending"/> </xsl:when> <xsl:when test="$inSort/@type = 'Descending'"> <xsl:value-of select="$valDescending"/> </xsl:when> <xsl:when test="$inSort/@type = 'Custom'"> <xsl:value-of select="$valCustomValueList"/> </xsl:when> </xsl:choose> </xsl:template> <!--Get TableAlias Reference given the name --> <xsl:template name="TableAliasReferenceGivenName"> <xsl:param name="inTableAliasName"/> <xsl:variable name="tableAlias" select="/FMPReport/File/RelationshipGraph/TableList/Table[@name = $inTableAliasName]"/> <xsl:choose> <xsl:when test="$tableAlias"> <xsl:call-template name="TableAliasReference"> <xsl:with-param name="inTableAlias" select="$tableAlias"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <em><xsl:value-of select="$inTableAliasName"/></em> </xsl:otherwise> </xsl:choose> </xsl:template> <!-- Get the relationship reference --> <xsl:template name="RelationshipReference"> <xsl:param name="inRelationship"/> <xsl:variable name="relationshipName"> <xsl:call-template name="GetRelationshipName"> <xsl:with-param name="inRelationship" select="$inRelationship"/> </xsl:call-template> </xsl:variable> <xsl:call-template name="ItalicLink-WithAnchor"> <xsl:with-param name="inAnchor" select="concat('#',$relationshipName, $kAnchorRelationship)"/> <xsl:with-param name="inDisplayText" select="$relationshipName"/> </xsl:call-template> </xsl:template> <!--Relationship anchor --> <xsl:template name="RelationshipAnchor"> <xsl:param name="inRelationship"/> <xsl:variable name="relationshipName"> <xsl:call-template name="GetRelationshipName"> <xsl:with-param name="inRelationship" select="$inRelationship"/> </xsl:call-template> </xsl:variable> <xsl:call-template name="ItalicAnchorPoint"> <xsl:with-param name="inAnchor" select="concat($relationshipName, $kAnchorRelationship)"/> <xsl:with-param name="inDisplayText" select="$relationshipName"/> </xsl:call-template> </xsl:template> <xsl:template name="GetRelationshipName"> <xsl:param name="inRelationship"/> <xsl:variable name="relationshipType"> <xsl:call-template name="GetRelationshipType"> <xsl:with-param name="inRelationship" select="$inRelationship"/> </xsl:call-template> </xsl:variable> <xsl:value-of select="concat($inRelationship/LeftTable/@name, $relationshipType, $inRelationship/RightTable/@name)"/> </xsl:template> <xsl:template name="GetRelationshipType"> <xsl:param name="inRelationship"/> <xsl:choose> <xsl:when test="count($inRelationship/JoinPredicateList/JoinPredicate) > 1"> <xsl:value-of select="$valInfinite"/> </xsl:when> <xsl:otherwise> <xsl:call-template name="JoinPredicateType"> <xsl:with-param name="inJoinPredicate" select="$inRelationship/JoinPredicateList/JoinPredicate[1]"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="JoinPredicateType"> <xsl:param name="inJoinPredicate"/> <xsl:choose> <xsl:when test="$inJoinPredicate/@type = 'Equal'"> <xsl:value-of select="$valEqual"/> </xsl:when> <xsl:when test="$inJoinPredicate/@type = 'NotEqual'"> <xsl:value-of select="$valNotEqual"/> </xsl:when> <xsl:when test="$inJoinPredicate/@type = 'LessThan'"> <xsl:value-of select="$valLessThan"/> </xsl:when> <xsl:when test="$inJoinPredicate/@type = 'LessThanOrEqualTo'"> <xsl:value-of select="$valLessThanOrEqualTo"/> </xsl:when> <xsl:when test="$inJoinPredicate/@type = 'GreaterThan'"> <xsl:value-of select="$valGreaterThan"/> </xsl:when> <xsl:when test="$inJoinPredicate/@type = 'GreaterThanOrEqualTo'"> <xsl:value-of select="$valGreaterThanOrEqualTo"/> </xsl:when> <xsl:when test="$inJoinPredicate/@type = 'CartesianProduct'"> <xsl:value-of select="$valCartesianProduct"/> </xsl:when> </xsl:choose> </xsl:template> <xsl:template name="GetSourceFileGivenTableAlias"> <xsl:param name="inTableAlias"/> <xsl:choose> <xsl:when test="$inTableAlias/FileReference"> <xsl:value-of select="concat($valFileReference,': ')"/> <xsl:call-template name="FileRefReference"> <xsl:with-param name="inFileReference" select="$inTableAlias/FileReference"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select="/FMPReport/File/@name"/> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="GetState"> <xsl:param name="inValue"/> <xsl:choose> <xsl:when test="$inValue = 'True'"> <xsl:value-of select="$valOn"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="$valOff"/> </xsl:otherwise> </xsl:choose> </xsl:template> <!--Generate privilege information--> <xsl:template name="Table-PrivilegeCatalog" match="PrivilegesCatalog"> <p> <span class="partheading"> <xsl:call-template name="AnchorPoint"> <xsl:with-param name="inAnchor" select="concat($valPrivilegeSets, $kAnchorSection)"/> <xsl:with-param name="inDisplayText" select="$valPrivilegeSets"/> </xsl:call-template> </span> </p> <xsl:for-each select="PrivilegeSet"> <table width="95%" border="1"> <tbody> <tr class="privsetfirst" vAlign="top"> <td colSpan="2"> <xsl:value-of select="concat($valPrivilegeSet, ': ')"/> <xsl:call-template name="PrivilegeSetAnchor"> <xsl:with-param name="inPrivilegeSet" select="."/> </xsl:call-template> </td> </tr> <tr vAlign="top"> <td class="chartheadersnobg" width="11%"> <xsl:value-of select="$valDescription"/> </td> <td class="regularcharttext" width="89%"> <xsl:value-of select="@comment"/> </td> </tr> <tr vAlign="top"> <td class="chartheadersnobg"> <xsl:value-of select="$valUsedBy"/> </td> <td class="regularcharttext"> <xsl:variable name="currentPrivilegeSet" select="."/> <xsl:variable name="accountList" select="/FMPReport/File/AccountCatalog/Account[@privilegeSet = $currentPrivilegeSet/@name]"/> <xsl:for-each select="$accountList"> <!--SORTBYNAME--> <!--<xsl:sort select="@name"/>--> <xsl:if test="generate-id(.) != generate-id($accountList[1])"> <xsl:value-of select="', '"/> </xsl:if> <xsl:call-template name="AccountReference"> <xsl:with-param name="inAccount" select="."/> </xsl:call-template> </xsl:for-each> </td> </tr> </tbody> </table> <!--Data Access and Design --> <table width="95%" border="1"> <tbody> <tr vAlign="top"> <td class="chartsubheads" colSpan="5"> <xsl:value-of select="$valDataAccessAndDesign"/> </td> </tr> <!--Record privileges--> <tr vAlign="top"> <td class="chartheadersnobg" width="11%"> <xsl:value-of select="$valRecords"/> </td> <td class="regularcharttext" width="19%"> <xsl:call-template name="GetAccessType"> <xsl:with-param name="inAccessType" select="Records/@value"/> </xsl:call-template> </td> <xsl:choose> <xsl:when test="Records/@value != 'Custom'"> <td class="regularcharttext" width="70%"> </td> </xsl:when> <xsl:otherwise> <td width="69%" colSpan="2"> <xsl:call-template name="TablePrivileges"> <xsl:with-param name="inTableList" select="Records/TableList"/> </xsl:call-template> </td> </xsl:otherwise> </xsl:choose> </tr> <!--Layout privileges--> <tr vAlign="top"> <td class="chartheadersnobg" width="11%"> <xsl:value-of select="$valLayouts"/> </td> <td class="regularcharttext" width="19%"> <xsl:call-template name="GetAccessType"> <xsl:with-param name="inAccessType" select="Layouts/@value"/> </xsl:call-template> </td> <xsl:choose> <xsl:when test="Layouts/@value != 'Custom'"> <td class="regularcharttext" width="70%"> </td> </xsl:when> <xsl:otherwise> <td width="69%" colSpan="2"> <span class="regularcharttext"> <xsl:value-of select="concat($valAllowCreationLayouts, ': ')"/> <xsl:call-template name="GetState"> <xsl:with-param name="inValue" select="Layouts/@allowCreation"/> </xsl:call-template> </span> <xsl:call-template name="LayoutPrivileges"> <xsl:with-param name="inLayoutList" select="Layouts/LayoutList"/> </xsl:call-template> </td> </xsl:otherwise> </xsl:choose> </tr> <!-- Value list privileges--> <tr vAlign="top"> <td class="chartheadersnobg" width="11%"> <xsl:value-of select="$valValueLists"/> </td> <td class="regularcharttext" width="19%"> <xsl:call-template name="GetAccessType"> <xsl:with-param name="inAccessType" select="ValueLists/@value"/> </xsl:call-template> </td> <xsl:choose> <xsl:when test="ValueLists/@value != 'Custom'"> <td class="regularcharttext" width="70%"> </td> </xsl:when> <xsl:otherwise> <td width="69%" colSpan="2"> <span class="regularcharttext"> <xsl:value-of select="concat($valAllowCreationValueLists, ': ')"/> <xsl:call-template name="GetState"> <xsl:with-param name="inValue" select="ValueLists/@allowCreation"/> </xsl:call-template> </span> <xsl:call-template name="ValueListPrivileges"> <xsl:with-param name="inValueListList" select="ValueLists/ValueListList"/> </xsl:call-template> </td> </xsl:otherwise> </xsl:choose> </tr> <!--Script Privileges--> <tr vAlign="top"> <td class="chartheadersnobg" width="11%"> <xsl:value-of select="$valScripts"/> </td> <td class="regularcharttext" width="19%"> <xsl:call-template name="GetAccessType"> <xsl:with-param name="inAccessType" select="Scripts/@value"/> </xsl:call-template> </td> <xsl:choose> <xsl:when test="Scripts/@value != 'Custom'"> <td class="regularcharttext" width="70%"> </td> </xsl:when> <xsl:otherwise> <td width="69%" colSpan="2"> <span class="regularcharttext"> <xsl:value-of select="concat($valAllowCreationScripts, ': ')"/> <xsl:call-template name="GetState"> <xsl:with-param name="inValue" select="Scripts/@allowCreation"/> </xsl:call-template> </span> <xsl:call-template name="ScriptPrivileges"> <xsl:with-param name="inScriptList" select="Scripts/ScriptList"/> </xsl:call-template> </td> </xsl:otherwise> </xsl:choose> </tr> </tbody> </table> <!--Other privileges --> <xsl:call-template name="OtherPrivileges"> <xsl:with-param name="inPrivilegeSet" select="."/> </xsl:call-template> <!--Selected Extended Privileges--> <xsl:call-template name="SelectedExtendedPrivileges"> <xsl:with-param name="inPrivilegeSet" select="."/> </xsl:call-template> <xsl:choose> <xsl:when test="generate-id(.) != generate-id(/FMPReport/File/PrivilegesCatalog/Privilege[last()])"> <br/> </xsl:when> </xsl:choose> </xsl:for-each> </xsl:template> <xsl:template name="GetAccessType"> <xsl:param name="inAccessType"/> <xsl:choose> <xsl:when test="'ViewOnly' = $inAccessType"> <xsl:value-of select="$valViewOnly"/> </xsl:when> <xsl:when test="'CreateEdit' = $inAccessType"> <xsl:value-of select="$valCreateEdit"/> </xsl:when> <xsl:when test="'CreateEditDelete' = $inAccessType"> <xsl:value-of select="$valCreateEditDelete"/> </xsl:when> <xsl:when test="'Modifiable' = $inAccessType"> <xsl:value-of select="$valModifiable"/> </xsl:when> <xsl:when test="'NoAccess' = $inAccessType"> <xsl:value-of select="$valNoAccess"/> </xsl:when> <xsl:when test="'Custom' = $inAccessType"> <xsl:value-of select="$valCustom"/> </xsl:when> <xsl:when test="'ExecutableOnly' = $inAccessType"> <xsl:value-of select="$valExecutableOnly"/> </xsl:when> </xsl:choose> </xsl:template> <xsl:template name="TablePrivileges"> <xsl:param name="inTableList"/> <table borderColor="#cccccc" cellSpacing="1" cellPadding="1" width="100%" border="1"> <tbody> <tr class="limitedPSchartheadings"> <td width="18%"> <strong><xsl:value-of select="$valTableName"/></strong> </td> <td width="18%"> <strong><xsl:value-of select="$valView"/></strong> </td> <td width="14%"> <strong><xsl:value-of select="$valEdit"/></strong> </td> <td width="14%"> <strong><xsl:value-of select="$valCreate"/></strong> </td> <td width="14%"> <strong><xsl:value-of select="$valDelete"/></strong> </td> <td width="22%"> <strong><xsl:value-of select="$valFieldAccess"/></strong> </td> </tr> <xsl:for-each select="$inTableList/BaseTable"> <!--SORTBYNAME--> <!--<xsl:sort select="@name"/>--> <tr class="regularcharttext" vAlign="top"> <td> <xsl:call-template name="BaseTableReference"> <xsl:with-param name="inBaseTable" select="@name"/> </xsl:call-template> </td> <td> <xsl:call-template name="GetAccessValue"> <xsl:with-param name="inAccess" select="View"/> </xsl:call-template> </td> <td> <xsl:call-template name="GetAccessValue"> <xsl:with-param name="inAccess" select="Edit"/> </xsl:call-template> </td> <td> <xsl:call-template name="GetAccessValue"> <xsl:with-param name="inAccess" select="Create"/> </xsl:call-template> </td> <td> <xsl:call-template name="GetAccessValue"> <xsl:with-param name="inAccess" select="Delete"/> </xsl:call-template> </td> <td> <xsl:call-template name="FieldAccess"> <xsl:with-param name="inAccess" select="FieldAccess"/> </xsl:call-template> </td> </tr> </xsl:for-each> </tbody> </table> </xsl:template> <xsl:template name="LayoutPrivileges"> <xsl:param name="inLayoutList"/> <table borderColor="#cccccc" cellSpacing="1" cellPadding="1" width="100%" border="1"> <tbody> <tr class="limitedPSchartheadings"> <td width="27%"> <strong><xsl:value-of select="$valLayoutName"/></strong> </td> <td width="27%"> <strong><xsl:value-of select="$valLayoutAccess"/></strong> </td> <td width="17%"> <strong><xsl:value-of select="$valDataAccess"/></strong> </td> <td width="29%"> <strong><xsl:value-of select="$valAssociatedTableOccurrence"/></strong> </td> </tr> <xsl:for-each select="$inLayoutList/Layout"> <!--SORTBYNAME--> <!--<xsl:sort select="@name"/>--> <tr class="regularcharttext" vAlign="top"> <td> <xsl:call-template name="LayoutReference"> <xsl:with-param name="inLayout" select="."/> </xsl:call-template> </td> <td> <xsl:call-template name="GetAccessType"> <xsl:with-param name="inAccessType" select="LayoutAccess/@value"/> </xsl:call-template> </td> <td> <xsl:call-template name="GetAccessType"> <xsl:with-param name="inAccessType" select="DataAccess/@value"/> </xsl:call-template> </td> <td> <xsl:variable name="layoutName" select="@name"/> <xsl:variable name="layoutID" select="@id"/> <xsl:call-template name="TableAliasReference"> <xsl:with-param name="inTableAlias" select="/FMPReport/File/LayoutCatalog/Layout[@name = $layoutName and @id = $layoutID]/Table"/> </xsl:call-template> </td> </tr> </xsl:for-each> </tbody> </table> </xsl:template> <xsl:template name="ValueListPrivileges"> <xsl:param name="inValueListList"/> <table borderColor="#cccccc" cellSpacing="1" cellPadding="1" width="100%" border="1"> <tbody> <tr class="limitedPSchartheadings"> <td> <strong><xsl:value-of select="$valValueListName"/></strong> </td> <td> <strong><xsl:value-of select="$valValueListAccess"/></strong> </td> </tr> <xsl:for-each select="$inValueListList/ValueList"> <!--SORTBYNAME--> <!--<xsl:sort select="@name"/>--> <tr class="regularcharttext" vAlign="top"> <td> <xsl:call-template name="VLReference"> <xsl:with-param name="inVL" select="."/> </xsl:call-template> </td> <td> <xsl:call-template name="GetAccessType"> <xsl:with-param name="inAccessType" select="Access/@value"/> </xsl:call-template> </td> </tr> </xsl:for-each> </tbody> </table> </xsl:template> <xsl:template name="ScriptPrivileges"> <xsl:param name="inScriptList"/> <table borderColor="#cccccc" cellSpacing="1" cellPadding="1" width="100%" border="1"> <tbody> <tr class="limitedPSchartheadings"> <td> <strong><xsl:value-of select="$valScriptName"/></strong> </td> <td> <strong><xsl:value-of select="$valScriptAccess"/></strong> </td> <td> <strong><xsl:value-of select="$valNotes"/></strong> </td> </tr> <xsl:for-each select="$inScriptList/Script"> <!--SORTBYNAME--> <!--<xsl:sort select="@name"/>--> <tr class="regularcharttext" vAlign="top"> <td> <xsl:call-template name="ScriptReference"> <xsl:with-param name="inScript" select="."/> </xsl:call-template> </td> <td> <xsl:call-template name="GetAccessType"> <xsl:with-param name="inAccessType" select="Access/@value"/> </xsl:call-template> </td> <td> <xsl:if test="@runFullAccess = 'True'"> <xsl:value-of select="$valRunScriptFullAccess"/> </xsl:if> </td> </tr> </xsl:for-each> </tbody> </table> </xsl:template> <xsl:template name="FieldAccess"> <xsl:param name="inAccess"/> <xsl:call-template name="GetAccessValue"> <xsl:with-param name="inAccess" select="$inAccess"/> </xsl:call-template> <xsl:if test="$inAccess/FieldList"> <ul> <xsl:for-each select="$inAccess/FieldList/Field"> <li> <xsl:call-template name="FieldDefinitionReference"> <xsl:with-param name="inFieldDefinition" select="."/> </xsl:call-template> <xsl:text>: </xsl:text> <xsl:call-template name="GetAccessType"> <xsl:with-param name="inAccessType" select="@accessRestriction"/> </xsl:call-template> </li> </xsl:for-each> </ul> </xsl:if> </xsl:template> <xsl:template name="GetAccessValue"> <xsl:param name="inAccess"/> <xsl:choose> <xsl:when test="$inAccess/@value = 'True'"> <xsl:value-of select="$valYes"/> </xsl:when> <xsl:when test="$inAccess/@value = 'False'"> <xsl:value-of select="$valNo"/> </xsl:when> <xsl:when test="$inAccess/@value = 'Limited'"> <p><xsl:value-of select="$valLimited"/></p> <xsl:if test="$inAccess/DisplayCalculation"> <p><xsl:value-of select="concat($valCalculation, ':')"/></p> <p> <xsl:call-template name="GenerateCalc"> <xsl:with-param name="inDisplayCalc" select="$inAccess/DisplayCalculation"/> </xsl:call-template> </p> </xsl:if> </xsl:when> <xsl:when test="$inAccess/@value = 'All'"> <xsl:value-of select="$valAll"/> </xsl:when> <xsl:when test="$inAccess/@value = 'NoAccess'"> <xsl:value-of select="$valNone"/> </xsl:when> </xsl:choose> </xsl:template> <xsl:template name="PrivilegeMenu"> <xsl:param name="inMenu"/> <xsl:choose> <xsl:when test="$inMenu = 'All'"> <xsl:value-of select="$valAll"/> </xsl:when> <xsl:when test="$inMenu = 'EditOnly'"> <xsl:value-of select="$valEditingOnly"/> </xsl:when> <xsl:when test="$inMenu = 'Minimal'"> <xsl:value-of select="$valMinimal"/> </xsl:when> </xsl:choose> </xsl:template> <xsl:template name="OtherPrivileges"> <xsl:param name="inPrivilegeSet"/> <table width="95%" border="1"> <tbody> <tr vAlign="top"> <td class="chartsubheads" colSpan="5"> <xsl:value-of select="$valOtherPrivileges"/> </td> </tr> <tr vAlign="top"> <td class="chartheadersnobg" width="34%"> <xsl:value-of select="$valAllowPrinting"/> </td> <td class="regularcharttext" width="13%"> <xsl:call-template name="GetState"> <xsl:with-param name="inValue" select="$inPrivilegeSet/@printing"/> </xsl:call-template> </td> <td class="regularcharttext" width="53%"> </td> </tr> <tr vAlign="top"> <td class="chartheadersnobg" width="34%"> <xsl:value-of select="$valAllowExporting"/> </td> <td class="regularcharttext" width="13%"> <xsl:call-template name="GetState"> <xsl:with-param name="inValue" select="$inPrivilegeSet/@exporting"/> </xsl:call-template> </td> <td class="regularcharttext" width="53%"> </td> </tr> <tr vAlign="top"> <td class="chartheadersnobg" width="34%"> <xsl:value-of select="$valManageExtPrivileges"/> </td> <td class="regularcharttext" width="13%"> <xsl:call-template name="GetState"> <xsl:with-param name="inValue" select="$inPrivilegeSet/@managedExtended"/> </xsl:call-template> </td> <td class="regularcharttext" width="53%"> </td> </tr> <tr vAlign="top"> <td class="chartheadersnobg" width="34%"> <xsl:value-of select="$valAllowDataValidation"/> </td> <td class="regularcharttext" width="13%"> <xsl:call-template name="GetState"> <xsl:with-param name="inValue" select="$inPrivilegeSet/@overrideValidationWarning"/> </xsl:call-template> </td> <td class="regularcharttext" width="53%"> </td> </tr> <tr vAlign="top"> <td class="chartheadersnobg" width="34%"> <xsl:value-of select="$valDisconnectFromFMServer"/> </td> <td class="regularcharttext" width="13%"> <xsl:call-template name="GetState"> <xsl:with-param name="inValue" select="$inPrivilegeSet/@idleDisconnect"/> </xsl:call-template> </td> <td class="regularcharttext" width="53%"> </td> </tr> <tr vAlign="top"> <td class="chartheadersnobg" width="34%"> <xsl:value-of select="$valAllowModifyPassword"/> </td> <td class="regularcharttext" width="13%"> <xsl:call-template name="GetState"> <xsl:with-param name="inValue" select="$inPrivilegeSet/@allowModifyPassword"/> </xsl:call-template> </td> <td class="regularcharttext" width="53%"> <xsl:if test="$inPrivilegeSet/@passwordExpiry or $inPrivilegeSet/@passwordMinLength"> <ul> <xsl:if test="$inPrivilegeSet/@passwordExpiry"> <li> <xsl:value-of select="concat($valExpiraryDate,': ', $inPrivilegeSet/@passwordExpiry,' ',$valDays)"/> </li> </xsl:if> <xsl:if test="$inPrivilegeSet/@passwordMinLength"> <li> <xsl:value-of select="concat($valMinPasswordLength,': ', $inPrivilegeSet/@passwordMinLength,' ',$valCharacters)"/> </li> </xsl:if> </ul> </xsl:if> </td> </tr> <tr vAlign="top"> <td class="chartheadersnobg" width="34%"> <xsl:value-of select="$valAvailableMenuCommands"/> </td> <td class="regularcharttext" width="13%"> <xsl:call-template name="PrivilegeMenu"> <xsl:with-param name="inMenu" select="$inPrivilegeSet/@menu"/> </xsl:call-template> </td> <td class="regularcharttext" width="53%"> </td> </tr> </tbody> </table> </xsl:template> <xsl:template name="SelectedExtendedPrivileges"> <xsl:param name="inPrivilegeSet"/> <xsl:variable name="extendedPrivileges" select="/FMPReport/File/ExtendedPrivilegeCatalog/ExtendedPrivilege[PrivilegeSetList/PrivilegeSet/@name = $inPrivilegeSet/@name]"/> <xsl:if test="count($extendedPrivileges) > 0"> <table width="95%" border="1"> <tbody> <tr vAlign="top"> <td class="chartsubheads" colSpan="4"> <xsl:value-of select="$valExtendedPrivileges"/> </td> </tr> <xsl:for-each select="$extendedPrivileges"> <!--SORTBYNAME--> <!--<xsl:sort select="@name"/>--> <tr vAlign="top"> <td class="regularcharttext"> <xsl:call-template name="ExtendedPrivilegeReference"> <xsl:with-param name="inExtendedPrivilege" select="."/> </xsl:call-template> </td> </tr> </xsl:for-each> </tbody> </table> </xsl:if> </xsl:template> <!--Extended Privileges --> <xsl:template name="Table-ExtendedPrivilegeCatalog" match="ExtendedPrivilegeCatalog"> <p> <span class="partheading"> <xsl:call-template name="AnchorPoint"> <xsl:with-param name="inAnchor" select="concat($valExtendedPrivileges, $kAnchorSection)"/> <xsl:with-param name="inDisplayText" select="$valExtendedPrivileges"/> </xsl:call-template> </span> </p> <table width="95%" border="1"> <tbody> <tr class="chartheaders" vAlign="top"> <td width="16%"> <xsl:value-of select="$valKeyword"/> </td> <td width="50%"> <xsl:value-of select="$valDescription"/> </td> <td width="34%"> <xsl:value-of select="$valPrivilegeSet"/> </td> </tr> <xsl:for-each select="ExtendedPrivilege"> <!--SORTBYNAME--> <!--<xsl:sort select="@name"/>--> <tr class="regularcharttext" vAlign="top"> <td> <xsl:call-template name="ExtendedPrivilegeAnchor"> <xsl:with-param name="inExtendedPrivilege" select="."/> </xsl:call-template> </td> <td> <xsl:value-of select="@comment"/> </td> <td> <xsl:if test="PrivilegeSetList"> <ul> <xsl:for-each select="PrivilegeSetList/PrivilegeSet"> <!--SORTBYNAME--> <!--<xsl:sort select="@name"/>--> <li> <xsl:call-template name="PrivilegeSetReference"> <xsl:with-param name="inPrivilegeSetName" select="@name"/> </xsl:call-template> </li> </xsl:for-each> </ul> </xsl:if> </td> </tr> </xsl:for-each> </tbody> </table> </xsl:template> <!--User Account --> <xsl:template name="Table-AccountCatalog" match="AccountCatalog"> <p> <span class="partheading"> <xsl:call-template name="AnchorPoint"> <xsl:with-param name="inAnchor" select="concat($valAccounts, $kAnchorSection)"/> <xsl:with-param name="inDisplayText" select="$valAccounts"/> </xsl:call-template> </span> </p> <table width="95%" border="1"> <tbody> <tr class="chartheaders" vAlign="top"> <td width="12%"> <xsl:value-of select="$valAccountName"/> </td> <td width="13%"> <xsl:value-of select="$valPassword"/> </td> <td width="9%"> <xsl:value-of select="$valStatus"/> </td> <td width="6%"> <xsl:value-of select="$valType"/> </td> <td width="15%"> <xsl:value-of select="$valPrivilegeSet"/> </td> <td width="15%"> <xsl:value-of select="$valDescription"/> </td> <td width="27%"> <xsl:value-of select="$valChangePassword"/> </td> </tr> <xsl:for-each select="Account"> <!--SORTBYNAME--> <!--<xsl:sort select="@name"/>--> <tr class="regularcharttext"> <td> <xsl:call-template name="AccountAnchor"> <xsl:with-param name="inAccount" select="."/> </xsl:call-template> </td> <td> <xsl:if test="@emptyPassword = 'False'"> <xsl:value-of select="'*********'"/> </xsl:if> </td> <td> <xsl:call-template name="AccountStatus"> <xsl:with-param name="inStatus" select="@status"/> </xsl:call-template> </td> <td> <xsl:call-template name="AccountType"> <xsl:with-param name="inAccountType" select="@managedBy"/> </xsl:call-template> </td> <td> <xsl:call-template name="PrivilegeSetReference"> <xsl:with-param name="inPrivilegeSetName" select="@privilegeSet"/> </xsl:call-template> </td> <td> <xsl:value-of select="Description"/> </td> <td> <xsl:if test="@changePasswordOnNextLogin"> <xsl:call-template name="GetState"> <xsl:with-param name="inValue" select="@changePasswordOnNextLogin"/> </xsl:call-template> </xsl:if> </td> </tr> </xsl:for-each> </tbody> </table> </xsl:template> <xsl:template name="AccountStatus"> <xsl:param name="inStatus"/> <xsl:choose> <xsl:when test="$inStatus = 'Active'"> <xsl:value-of select="$valActive"/> </xsl:when> <xsl:when test="$inStatus = 'Inactive'"> <xsl:value-of select="$valInactive"/> </xsl:when> </xsl:choose> </xsl:template> <xsl:template name="AccountType"> <xsl:param name="inAccountType"/> <xsl:choose> <xsl:when test="$inAccountType = 'FileMaker'"> <xsl:value-of select="$valFileMaker"/> </xsl:when> <xsl:when test="$inAccountType = 'External'"> <xsl:value-of select="$valExternalServer"/> </xsl:when> </xsl:choose> </xsl:template> <!--File reference--> <xsl:template name="Table-FileReferenceCatalog" match="FileReferenceCatalog"> <p> <span class="partheading"> <xsl:call-template name="AnchorPoint"> <xsl:with-param name="inAnchor" select="concat($valFileReferences, $kAnchorSection)"/> <xsl:with-param name="inDisplayText" select="$valFileReferences"/> </xsl:call-template> </span> </p> <table width="100%" border="1" cellSpacing="1" cellPadding="1"> <tbody> <tr class="chartheaders" vAlign="top"> <td width="22%"> <xsl:value-of select="$valFileReference"/> </td> <td width="78%"> <xsl:value-of select="$valPathList"/> </td> </tr> <xsl:for-each select="FileReference"> <!--SORTBYNAME--> <!--<xsl:sort select="@name"/>--> <tr class="regularcharttext" vAlign="top"> <td> <xsl:call-template name="FileRefAnchor"> <xsl:with-param name="inFileReference" select="."/> </xsl:call-template> </td> <td> <xsl:value-of select="@pathList"/> </td> </tr> </xsl:for-each> </tbody> </table> </xsl:template> <!--Custom Function--> <xsl:template name="Table-CustomFunctionCatalog" match="CustomFunctionCatalog"> <p> <span class="partheading"> <xsl:call-template name="AnchorPoint"> <xsl:with-param name="inAnchor" select="concat($valCustomFunctions, $kAnchorSection)"/> <xsl:with-param name="inDisplayText" select="$valCustomFunctions"/> </xsl:call-template> </span> </p> <table width="100%" border="1" cellSpacing="1" cellPadding="1"> <tbody> <tr class="chartheaders" vAlign="top"> <td width="18%"> <xsl:value-of select="$valFunctionName"/> </td> <td width="18%"> <xsl:value-of select="$valParameters"/> </td> <td width="18%"> <xsl:value-of select="$valAvailability"/> </td> <td width="20%"> <xsl:value-of select="$valDefinition"/> </td> <td width="18%"> <xsl:value-of select="$valInFieldDefinitions"/> </td> <td width="18%"> <xsl:value-of select="$valInScripts"/> </td> </tr> <xsl:for-each select="CustomFunction"> <!--SORTBYNAME--> <!--<xsl:sort select="@name"/>--> <tr class="regularcharttext" vAlign="top"> <td> <xsl:call-template name="CustomFunctionAnchor"> <xsl:with-param name="inCustomFunction" select="."/> </xsl:call-template> </td> <td> <xsl:value-of select="@parameters"/> </td> <td> <xsl:choose> <xsl:when test="@visible = 'True'"> <xsl:value-of select="$valAllAccounts"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="$valOnlyAccountsFullPrivilege"/> </xsl:otherwise> </xsl:choose> </td> <td> <xsl:call-template name="GenerateCalc"> <xsl:with-param name="inDisplayCalc" select="DisplayCalculation"/> </xsl:call-template> </td> <!--References to field defintion--> <xsl:variable name="customFuncName" select="@name"/> <td> <xsl:variable name="fieldDefList" select="/FMPReport/File/BaseTableCatalog/BaseTable/FieldCatalog/Field[DisplayCalculation/Chunk[@type = 'CustomFunctionRef' and text() = $customFuncName] or AutoEnter/DisplayCalculation/Chunk[@type = 'CustomFunctionRef' and text() = $customFuncName] or Validation/DisplayCalculation/Chunk[@type = 'CustomFunctionRef' and text() = $customFuncName]]"/> <ul> <xsl:for-each select="$fieldDefList"> <li> <xsl:call-template name="FieldDefinitionReference"> <xsl:with-param name="inFieldDefinition" select="."/> </xsl:call-template> </li> </xsl:for-each> </ul> </td> <td> <xsl:variable name="scriptList" select="/FMPReport/File/ScriptCatalog/Script[*/*//Chunk[@type = 'CustomFunctionRef' and text() = $customFuncName]]"/> <xsl:if test="$scriptList"> <ul> <xsl:for-each select="$scriptList"> <!--SORTBYNAME--> <!--<xsl:sort select="@name"/>--> <li> <xsl:call-template name="ScriptReference"> <xsl:with-param name="inScript" select="."/> </xsl:call-template> </li> </xsl:for-each> </ul> </xsl:if> </td> </tr> </xsl:for-each> </tbody> </table> </xsl:template> <xsl:template name="Table-ValueListCatalog" match="ValueListCatalog"> <p> <span class="partheading"> <xsl:call-template name="AnchorPoint"> <xsl:with-param name="inAnchor" select="concat($valValueLists, $kAnchorSection)"/> <xsl:with-param name="inDisplayText" select="$valValueLists"/> </xsl:call-template> </span> </p> <table width="95%" border="1"> <tbody> <tr class="chartheaders" vAlign="top"> <td width="20%"> <xsl:value-of select="$valValueListName"/> </td> <td width="19%"> <xsl:value-of select="$valSource"/> </td> <td width="36%"> <xsl:value-of select="$valValues"/> </td> <td width="25%"> <xsl:value-of select="$valOnLayouts"/> </td> </tr> <xsl:for-each select="ValueList"> <!--SORTBYNAME--> <!--<xsl:sort select="@name"/>--> <tr class="regularcharttext"> <td> <xsl:call-template name="VLAnchor"> <xsl:with-param name="inVL" select="."/> </xsl:call-template> </td> <td> <xsl:call-template name="VLSource"> <xsl:with-param name="inSourceValue" select="Source/@value"/> </xsl:call-template> </td> <td> <ul> <xsl:if test="CustomValues"> <li> <xsl:call-template name="ReplaceString"> <xsl:with-param name="inputString" select="CustomValues/Text"/> <xsl:with-param name="findString" select="'
'"/> <xsl:with-param name="replaceString" select="', '"/> </xsl:call-template> </li> </xsl:if> <xsl:if test="PrimaryField"> <li> <xsl:value-of select="concat($valField,': ')"/> <xsl:call-template name="FieldReference-ShowTableAlias"> <xsl:with-param name="inField" select="PrimaryField/Field"/> </xsl:call-template> </li> </xsl:if> <xsl:if test="SecondaryField"> <li> <xsl:value-of select="concat($valField,': ')"/> <xsl:call-template name="FieldReference-ShowTableAlias"> <xsl:with-param name="inField" select="SecondaryField/Field"/> </xsl:call-template> </li> </xsl:if> <xsl:if test="ShowRelated/@value = 'True'"> <li> <xsl:value-of select="concat($valTableOccurrence,': ')"/> <xsl:call-template name="TableAliasReferenceGivenName"> <xsl:with-param name="inTableAliasName" select="ShowRelated/Table/@name"/> </xsl:call-template> </li> </xsl:if> <xsl:if test="External"> <li> <xsl:value-of select="concat($valFileReference, ': ')"/> <xsl:call-template name="FileRefReference"> <xsl:with-param name="inFileReference" select="External/FileReference"/> </xsl:call-template> </li> <li> <xsl:value-of select="concat($valValueList, ': ')"/> <xsl:call-template name="ExternalVLReference"> <xsl:with-param name="inExternalVL" select="External/ValueList"/> <xsl:with-param name="inFileRef" select="External/FileReference"/> </xsl:call-template> </li> </xsl:if> </ul> </td> <td> <ul> <xsl:variable name="valuelistName" select="@name"/> <xsl:for-each select="/FMPReport/File/LayoutCatalog/Layout[Object/FieldObj/DDRInfo/ValueList[@name = $valuelistName]]"> <!--SORTBYNAME--> <!--<xsl:sort select="@name"/>--> <li> <xsl:call-template name="LayoutReference"> <xsl:with-param name="inLayout" select="."/> </xsl:call-template> </li> </xsl:for-each> </ul> </td> </tr> </xsl:for-each> </tbody> </table> </xsl:template> <xsl:template name="VLSource"> <xsl:param name="inSourceValue"/> <xsl:choose> <xsl:when test="$inSourceValue = 'Field'"> <xsl:value-of select="$valField"/> </xsl:when> <xsl:when test="$inSourceValue = 'Custom'"> <xsl:value-of select="$valCustom"/> </xsl:when> <xsl:when test="$inSourceValue = 'External'"> <xsl:value-of select="$valExternal"/> </xsl:when> </xsl:choose> </xsl:template> <!--Script Catalog--> <xsl:template name="Table-ScriptCatalog" match="ScriptCatalog"> <p> <span class="partheading"> <xsl:call-template name="AnchorPoint"> <xsl:with-param name="inAnchor" select="concat($valScripts, $kAnchorSection)"/> <xsl:with-param name="inDisplayText" select="$valScripts"/> </xsl:call-template> </span> </p> <xsl:for-each select="Script"> <!--SORTBYNAME--> <!--<xsl:sort select="@name"/>--> <xsl:call-template name="Table-Script"/> </xsl:for-each> </xsl:template> <!--Script--> <xsl:template name="Table-Script"> <table width="100%" border="1"> <tbody> <tr class="privsetfirst" vAlign="top"> <td width="35%"> <xsl:value-of select="$valScriptName"/> </td> <td width="65%"> <xsl:call-template name="ScriptAnchor"> <xsl:with-param name="inScript" select="."/> </xsl:call-template> </td> </tr> <tr vAlign="top"> <td class="chartheadersnobg"> <xsl:value-of select="$valRunScriptFullAccess"/> </td> <td class="regularcharttext"> <xsl:call-template name="GetState"> <xsl:with-param name="inValue" select="@runFullAccess"/> </xsl:call-template> </td> </tr> <xsl:variable name="scriptId" select="@id"/> <xsl:variable name="scriptName" select="@name"/> <tr vAlign="top"> <td class="chartheadersnobg"> <xsl:value-of select="$valLayoutsUseThisScript"/> </td> <td class="regularcharttext"> <ul> <xsl:for-each select="/FMPReport/File/LayoutCatalog/Layout[Object/GroupButtonObj/Step/Script[@name = $scriptName and @id = $scriptId]]"> <!--SORTBYNAME--> <!--<xsl:sort select="@name"/>--> <li> <xsl:call-template name="LayoutReference"> <xsl:with-param name="inLayout" select="."/> </xsl:call-template> </li> </xsl:for-each> </ul> </td> </tr> <tr vAlign="top"> <td class="chartheadersnobg"> <xsl:value-of select="$valScriptsUseThisScript"/> </td> <td class="regularcharttext"> <ul> <xsl:for-each select="/FMPReport/File/ScriptCatalog/Script[StepList/Step/Script[@name = $scriptName and @id=$scriptId]]"> <!--SORTBYNAME--> <!--<xsl:sort select="@name"/>--> <li> <xsl:call-template name="ScriptReference"> <xsl:with-param name="inScript" select="."/> </xsl:call-template> </li> </xsl:for-each> </ul> </td> </tr> <tr vAlign="top"> <td class="chartsubheads" colSpan="2"> <xsl:value-of select="$valScriptDefinition"/> </td> </tr> <tr vAlign="top"> <td class="chartheadersnobg"> <xsl:value-of select="$valScriptSteps"/> </td> <td class="regularcharttext"> <ul> <xsl:for-each select="StepList/Step"> <li> <xsl:value-of select="StepText"/> </li> </xsl:for-each> </ul> </td> </tr> <xsl:variable name="fieldList" select="StepList/Step//Field"/> <tr vAlign="top"> <td class="chartheadersnobg"> <xsl:value-of select="$valFieldsUsedInScript"/> </td> <td class="regularcharttext"> <ul> <xsl:for-each select="$fieldList"> <!--SORTBYNAME--> <!--<xsl:sort select="@name"/>--> <xsl:variable name="field" select="."/> <xsl:if test="generate-id($fieldList[(@name = $field/@name) and (@table = $field/@table)][1]) = generate-id(.)"> <li> <xsl:call-template name="FieldReference-ShowTableAlias"> <xsl:with-param name="inField" select="."/> </xsl:call-template> </li> </xsl:if> </xsl:for-each> </ul> </td> </tr> <tr vAlign="top"> <td class="chartheadersnobg"> <xsl:value-of select="$valScriptsUsedInScript"/> </td> <td class="regularcharttext"> <ul> <xsl:variable name="scriptList" select="StepList/Step//Script"/> <xsl:for-each select="$scriptList"> <!--SORTBYNAME--> <!--<xsl:sort select="@name"/>--> <xsl:variable name="script" select="."/> <xsl:if test="generate-id($scriptList[(@name = $script/@name) and (@id = $script/@id)][1]) = generate-id(.)"> <li> <xsl:variable name="fileRef" select="preceding-sibling::UniversalPathList"/> <xsl:choose> <xsl:when test="$fileRef"> <xsl:call-template name="ExternalScriptReference"> <xsl:with-param name="inFileRef" select="$fileRef"/> <xsl:with-param name="inScript" select="$script"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:call-template name="ScriptReference"> <xsl:with-param name="inScript" select="$script"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </li> </xsl:if> </xsl:for-each> </ul> </td> </tr> <tr vAlign="top"> <td class="chartheadersnobg"> <xsl:value-of select="$valLayoutsUsedInScript"/> </td> <td class="regularcharttext"> <ul> <xsl:variable name="layoutList" select="StepList/Step//Layout"/> <xsl:for-each select="$layoutList"> <!--SORTBYNAME--> <!--<xsl:sort select="@name"/>--> <xsl:variable name="layout" select="."/> <xsl:if test="generate-id($layoutList[(@name = $layout/@name) and (@id = $layout/@id)][1]) = generate-id(.)"> <li> <xsl:call-template name="LayoutReference"> <xsl:with-param name="inLayout" select="."/> </xsl:call-template> </li> </xsl:if> </xsl:for-each> </ul> </td> </tr> <tr vAlign="top"> <td class="chartheadersnobg"> <xsl:value-of select="$valTablesUsedInScript"/> </td> <td class="regularcharttext"> <ul> <xsl:for-each select="$fieldList"> <xsl:sort select="key('BaseTable-TableAliasIndex',@table)[1]/@baseTable"/> <xsl:variable name="field" select="."/> <xsl:variable name="uniqueFieldList" select="$fieldList[@table = $field/@table]"/> <xsl:if test="generate-id(.) = generate-id($uniqueFieldList[1])"> <!--sort according to base table names!!--> <xsl:variable name="tableAlias" select="/FMPReport/File/RelationshipGraph/TableList/Table[@name = $field/@table]"/> <xsl:if test="generate-id($fieldList[ (@name = $field/@name) and (key('BaseTable-TableAliasIndex',@table)[1]/@baseTable = $tableAlias/@baseTable) and (string(key('BaseTable-TableAliasIndex',@table)[1]/FileReference/@name) = string($tableAlias/FileReference/@name)) ][1]) = generate-id(.)"> <li> <xsl:call-template name="BaseTableRefGivenTableAlias"> <xsl:with-param name="inTableAlias" select="$tableAlias"/> </xsl:call-template> </li> </xsl:if> </xsl:if> </xsl:for-each> </ul> </td> </tr> <tr vAlign="top"> <td class="chartheadersnobg"> <xsl:value-of select="$valTableOccurrencesUsedInScript"/> </td> <td class="regularcharttext"> <ul> <xsl:for-each select="$fieldList"> <xsl:sort select="@table"/> <xsl:variable name="field" select="."/> <xsl:if test="generate-id($fieldList[@table = $field/@table][1]) = generate-id(.)"> <xsl:variable name="tableOccurrence" select="key('BaseTable-TableAliasIndex',$field/@table)"/> <xsl:if test="$tableOccurrence"> <li> <xsl:call-template name="TableAliasReference"> <xsl:with-param name="inTableAlias" select="$tableOccurrence"/> </xsl:call-template> </li> </xsl:if> </xsl:if> </xsl:for-each> </ul> </td> </tr> <tr vAlign="top"> <td class="chartheadersnobg"> <xsl:value-of select="$valCustomFunctionsUsedInScript"/> </td> <td class="regularcharttext"> <ul> <xsl:variable name="chunkList" select="StepList/Step/*//Chunk[@type = 'CustomFunctionRef']"/> <xsl:for-each select="$chunkList"> <!--Sort according to function name!!--> <!--SORTBYNAME--> <!--<xsl:sort select="text()"/>--> <xsl:variable name="chunk" select="."/> <!--Remove duplicates--> <xsl:if test="generate-id($chunkList[text() = $chunk/text()][1]) = generate-id(.)"> <li> <xsl:call-template name="CustomFunctionReference"> <xsl:with-param name="inCustomFunctionName" select="$chunk/text()"/> </xsl:call-template> </li> </xsl:if> </xsl:for-each> </ul> </td> </tr> </tbody> </table> </xsl:template> <!--Don't do anything, already handled--> <xsl:template name="Options" match="Options"> </xsl:template> <xsl:template name="Language"> <xsl:param name="inLang"/> <xsl:choose> <xsl:when test="$inLang = 'Unicode_Raw'"> <xsl:value-of select="$valUnicode_Raw"/> </xsl:when> <xsl:when test="$inLang = 'Unicode_Standard'"> <xsl:value-of select="$valUnicode_Standard"/> </xsl:when> <xsl:when test="$inLang = 'Catalog'"> <xsl:value-of select="$valCatalog"/> </xsl:when> <xsl:when test="$inLang = 'Catalan'"> <xsl:value-of select="$valCatalan"/> </xsl:when> <xsl:when test="$inLang = 'Croatian'"> <xsl:value-of select="$valCroatian"/> </xsl:when> <xsl:when test="$inLang = 'Czech'"> <xsl:value-of select="$valCzech"/> </xsl:when> <xsl:when test="$inLang = 'Danish'"> <xsl:value-of select="$valDanish"/> </xsl:when> <xsl:when test="$inLang = 'Dutch'"> <xsl:value-of select="$valDutch"/> </xsl:when> <xsl:when test="$inLang = 'Unicode_Raw'"> <xsl:value-of select="$valUnicode_Raw"/> </xsl:when> <xsl:when test="$inLang = 'English'"> <xsl:value-of select="$valEnglish"/> </xsl:when> <xsl:when test="$inLang = 'Finnish'"> <xsl:value-of select="$valFinnish"/> </xsl:when> <xsl:when test="$inLang = 'Finnish_Custom'"> <xsl:value-of select="$valFinnish_Custom"/> </xsl:when> <xsl:when test="$inLang = 'Finnish_Custom'"> <xsl:value-of select="$valFinnish_Custom"/> </xsl:when> <xsl:when test="$inLang = 'French'"> <xsl:value-of select="$valFrench"/> </xsl:when> <xsl:when test="$inLang = 'German'"> <xsl:value-of select="$valGerman"/> </xsl:when> <xsl:when test="$inLang = 'German_Dictionary'"> <xsl:value-of select="$valGerman_Dictionary"/> </xsl:when> <xsl:when test="$inLang = 'Greek'"> <xsl:value-of select="$valGreek"/> </xsl:when> <xsl:when test="$inLang = 'Hungarian'"> <xsl:value-of select="$valHungarian"/> </xsl:when> <xsl:when test="$inLang = 'Icelandic'"> <xsl:value-of select="$valIcelandic"/> </xsl:when> <xsl:when test="$inLang = 'Italian'"> <xsl:value-of select="$valItalian"/> </xsl:when> <xsl:when test="$inLang = 'Japanese'"> <xsl:value-of select="$valJapanese"/> </xsl:when> <xsl:when test="$inLang = 'Norwegian'"> <xsl:value-of select="$valNorwegian"/> </xsl:when> <xsl:when test="$inLang = 'Polish'"> <xsl:value-of select="$valPolish"/> </xsl:when> <xsl:when test="$inLang = 'Portuguese'"> <xsl:value-of select="$valPortuguese"/> </xsl:when> <xsl:when test="$inLang = 'Romanian'"> <xsl:value-of select="$valRomanian"/> </xsl:when> <xsl:when test="$inLang = 'Russian'"> <xsl:value-of select="$valRussian"/> </xsl:when> <xsl:when test="$inLang = 'Slovak'"> <xsl:value-of select="$valSlovak"/> </xsl:when> <xsl:when test="$inLang = 'Slovenian'"> <xsl:value-of select="$valSlovenian"/> </xsl:when> <xsl:when test="$inLang = 'Spanish'"> <xsl:value-of select="$valSpanish"/> </xsl:when> <xsl:when test="$inLang = 'Spanish_Traditional'"> <xsl:value-of select="$valSpanish_Traditional"/> </xsl:when> <xsl:when test="$inLang = 'Swedish'"> <xsl:value-of select="$valSwedish"/> </xsl:when> <xsl:when test="$inLang = 'Swedish_Custom'"> <xsl:value-of select="$valSwedish_Custom"/> </xsl:when> <xsl:when test="$inLang = 'Turkish'"> <xsl:value-of select="$valTurkish"/> </xsl:when> <xsl:when test="$inLang = 'Ukranian'"> <xsl:value-of select="$valUkranian"/> </xsl:when> </xsl:choose> </xsl:template> </xsl:stylesheet>